changed git call from https to git readonly
[atutor.git] / mods / atsocial_iphone_app / TouchJSON / JSON / CJSONDeserializer.m
1 //
2 //  CJSONDeserializer.m
3 //  TouchJSON
4 //
5 //  Created by Jonathan Wight on 12/15/2005.
6 //  Copyright 2005 Toxic Software. All rights reserved.
7 //
8
9 #import "CJSONDeserializer.h"
10
11 #import "CJSONScanner.h"
12 #import "CDataScanner.h"
13
14 @implementation CJSONDeserializer
15
16 + (id)deserializer
17 {
18 return([[[self alloc] init] autorelease]);
19 }
20
21 - (id)deserialize:(NSData *)inData error:(NSError **)outError
22 {
23 CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData];
24 id theObject = NULL;
25 if ([theScanner scanJSONObject:&theObject error:outError] == YES)
26         return(theObject);
27 else
28         return(NULL);
29 }
30
31 @end