3 ms·
I'm aware of a few different JSON parsing libraries for C. * Metaparadigm's "JSON-C" library (see https://github.com/json-c/json-c/wiki https://github.com/json
by cmccabe 14y ago
I'm aware of a few different JSON parsing libraries for C.
* Metaparadigm's "JSON-C" library (see https://github.com/json-c/json-c/wiki https://github.com/json-c/json-c/wiki)
* Jansson (see http://www.digip.org/jansson/ http://www.digip.org/jansson/)
* yajl (see http://lloyd.github.com/yajl/ http://lloyd.github.com/yajl/)
All of those are licensed extremely permissively (BSD, ISC, etc) yajl seems kind of SAX-like, which I'm not really a big fan of, but I guess some people might like it. It would be good if you had a humungous JSON stream, for the same reasons SAX beats DOM in those cases.
json-c and Jansson seem pretty similar to me. Jansson seems to be more full-featured than json-c, with stuff like a json_equal method, a json_deep_copy method, and the ability to specify custom memory allocation functions. But for most use cases there isn't too much difference between the two.
So I guess my question is really what is the use case you're targeting? It would be nice to have some context about what you see as the niche you're filling.