a very silly json parser in C
- C 96.8%
- CMake 3.2%
| .gitignore | ||
| CMakeLists.txt | ||
| jerma.h | ||
| LICENSE | ||
| README.md | ||
| tests.c | ||
jerma
a json parser in C, with some goofy behaviours.
examples
jerma reluctantly accepts valid RFC 7159 json structures, except for unicode escape sequences and exponential numbers, coz I couldn't be bothered
{"test": [1,2,3]}
null
[{}, 3.14, {"test": "4"}]
it may or may not treat commas as whitespace, and any whitespace as a valid delimiter between objects...
["a string" "...another string?", "hang on, I think you forgot something..."]
...and if it's unambiguous, it doesn't really need a delimiter at all:
["no...""this""can't""be"true"!"]
["I suppose you could find some n"0"vel uses for this though"]
alternatively, why not have all the delimiters? commas are just whitespace after all:
[4
,
,,,
,,,,, null, ,]
(this is treated as [4,null])
jerma is a header-only stb-style library. it uses clash
for maps internally, so you have to include an implementation of that with
#define CLASH_IMPLEMENTATION in one file. you have to
#define JERMA_IMPLEMENTATION too of course.