We are hosting the unmodified source for a JSON parser written by Jean Gressmann (based on JSON.org’s JSON checker) as a new JSON_parser repository. This high-performance, C-based, library can be used as a parser or as a checker. Through a callback function, the calling application can receive the parsed objects (name-value pairs) for a given JSON input.
Features highlighted by the author are as follows:
- Arbitrary levels of JSON object/array nesting.
- C-style comments.
- UTF-16 & escape sequence (\uXXXX) decoding to UTF-8.
- Allows for manual processing of floating point values.
To build the parser with your project, simply include and compile it with your source files. There is a sample (main.c) which demonstrates proper invocation of the parser with a callback function.