Reputation: 482
What is the best way to generate UTF-8 JSON in C? I've looked at Jansson, but it seems extremely bulky. Is there any other good low-dependency library for creating and reading JSON objects/strings in C?
Upvotes: 19
Views: 18116
Reputation: 3006
Perhaps the JSON module from CCAN? http://ccodearchive.net/ It doesn't even depend on anything else from CCAN, and consists of exactly two files json.c
and json.h
(The JSON module is here http://git.ozlabs.org/?p=ccan;a=tree;f=ccan/json )
Upvotes: 24