What’s the usecase for something like this? There are lots of excellent libraries for json available. Is this a teaching tool?
What’s the usecase for something like this? There are lots of excellent libraries for json available. Is this a teaching tool?
Trivial to integrate into an existing code base, minimal size overhead, no heap allocations, no stdlib usage (only stdbool.h and stddef.h included for type definitions), no C++ template shenanigans and very simple and straightforward API. C libraries which tick all those boxes are actually quite rare, and C++ libraries are much rarer.
Being able to parse without a lot of overhead and without allocations is quite interesting. E.g. when you process some massive json dump to just extract some properties (the Wikidata dumps come to mind).
If you want to do that you'd probably want to use a fast SAX parser, not something that naively looks at one byte at a time.
Can you link the parser you're talking about?
Embedded cpus is an easy one. You could maybe run an api server on a vape now.
A small single file, pure C dependency that doesn't allocate memory can be a universal solution to a common problem if it works well.
Small code is easier to review, so projects with strict security requirements might be one?
Also, license compliance is very easy (no notice required).
Arduino, where you have KB, not GB or even MB.
A basic reference for beginners or people looking at doing some simple parsing? Someone who wants a tiny code footprint for a small hobby project on a limited processor? Although in that case I would almost certainly use TOML or similar instead.
There doesn’t need to be a use case for everything, it is just a cool project
I suppose it's meant as a minimal library meant to be modded for the specific usecase.
> Zero-allocations with minimal state
the more the merrier