Skip to content

Commit

Permalink
Updated docs for the class renaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
schwa committed Oct 15, 2010
1 parent 02c4221 commit addb5e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.markdown
Expand Up @@ -89,7 +89,7 @@ Here is a code sample:

NSDictionary *dictionary = [NSDictionary dictionaryWithObject:@"b" forKey:@"a"];
NSError *error = NULL;
NSData *jsonData = [[CJSONDataSerializer serializer] serializeObject:dictionary error&error];
NSData *jsonData = [[CJSONSerializer serializer] serializeObject:dictionary error&error];

## Invalid JSON

Expand All @@ -109,7 +109,7 @@ TouchJSON will work UTF8, UTF16 & UTF32 (little and big endian) data. However in

JSON doesn't specify a date encoding format. As such various methods are used. As such TouchJSON doesn't dictate which format you use. ISO 8601 style dates (with as much precession as needed) are recoemmended. See <http://en.wikipedia.org/wiki/ISO_8601>. You can use the CExtensibleJSONDataSerializer class to automatically serialize Cocoa's NSDate objects into ISO-8601 strings (this sample code uses TouchFoundation <http://github.com/schwa/TouchFoundation>)

CExtensibleJSONDataSerializer *theSerializer = [[[CExtensibleJSONDataSerializer alloc] init] autorelease];
CExtensibleJSONSerializer *theSerializer = [[[CExtensibleJSONSerializer alloc] init] autorelease];

JSONConversionConverter theConverter = ^(id inObject) {
return((id)[(NSDate *)inObject ISO8601String]);
Expand Down

0 comments on commit addb5e0

Please sign in to comment.