This project will create a C library to parse and emit JSON. It will then provide wrappers for various languages including Lua, Python, and Ruby.
Design
Since there are so many C JSON parsers already, this one will try to do things a little differently:
- It will offer a “pull parser” interface modeled after JSONPP.
- Instead of building a tree, the layer above the pull parser will return a tree walker similar to that of ELTN-C.
- The implementation will attempt to avoid allocation and leaks in general.
The one exception may be the
Json_String
API, which tries to balance the need for better strings in C with the hazards of reference counting without smart pointers.
API
TODO
I/O
See also CPorts.
TODO
String
See also M-Strings and E-Strings.
TODO
Parser
TODO
Tree
TODO
Wrappers
Wrappers will use native I/O to construct a tree of native equivalents to JSON Arrays and Objects.
Lua
The parser will create a tree of tables.
TODO
Python
The parser will create a tree of dictionaries and lists.
TODO
Ruby
The parser will create a tree of Arrays and Hashes.
TODO