![]() |
Ignite Tools
|
The JSON parser class. More...
#import <UA_SBJsonParser.h>
Public Member Functions | |
(id) | - objectWithString: |
Return the object represented by the given string. | |
(id) | - fragmentWithString: |
The JSON parser class.
JSON is mapped to Objective-C types in the following way:
Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber instances. These are initialised with the -initWithBool: method, and round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be represented as 'true' and 'false' again.)
JSON numbers turn into NSDecimalNumber instances, as we can thus avoid any loss of precision. (JSON allows ridiculously large numbers.)