YAJL JSON Parser (Objective-C Bindings)

I recently was investigating using a more lightweight JSON parser for iPhone projects (other than the standard SBJSON library) and came across the YAJL C JSON library. While using it as a document style parser didn’t result in a huge performance gain, it does a support a streaming “SAX” style parser which might help memory usage in larger documents.

Hopefully, sometime soon I will do some performance comparisons. In the meantime, if you try these bindings, let me know how it goes. You can find it on github at: http://github.com/gabriel/yajl-objc.

Right now, I only have a framework (for 10.5) built, but check back and at some point will have a static iPhone library built as well.

Here are some quick usage examples:

Usage

Usage (Streaming)

Usage (Document style)

Updated (07/01/2009): Updated usage to use new API changes for better streaming support.

Tags: ,

2 Responses to “YAJL JSON Parser (Objective-C Bindings)”

  1. Steve Says:

    So is there no generator in the obj-c bindings? Only a parser?

  2. gabe Says:

    Yeah, right now, only parsing…

Leave a Reply