The XML vs. JSON debate will flame on until another popular data-interchange format comes along. There are lots of opinions out there, but, sometimes, regardless of your opinion on the matter, a project calls for JSON. For .NET projects, the library of choice is James Newton-King’s Json.NET. But, until recently, those developing on Macs didn’t have a strong (i.e., fast) solution. That is – until the screaming JSONKit came on the scene.
JSONKit is a “very high performance Objective-C JSON library” licensed under the BSD License and Copyright © 2011, John Engelhart. It supports NSString and NSData interfaces, has a nice set of parsing options, deserializes 23% Faster than a Binary .plist and serializes 549% Faster than a Binary .plist!
Note: The JSON to be parsed by JSONKit MUST be encoded as Unicode, preferably in UTF-8 format.
The code, benchmarks, and primitive mapping details are available at Github. You can get it here: https://github.com/johnezang/JSONKit.
Though not as performant, another Objective-C based parser for JSON is TouchJSON, based on Jonathan Wight’s CocoaJSON. It is available here: https://github.com/TouchCode/TouchJSON.


April 14, 2011

No comments yet... Be the first to leave a reply!