4 ms·
What’s the usecase for something like this? There are lots of excellent libraries for json available. Is this a teaching tool?
by adrianN 1y ago
What’s the usecase for something like this? There are lots of excellent libraries for json available. Is this a teaching tool?
- p2detar 1y ago> Zero-allocations with minimal state
- Snild 1y agoSmall code is easier to review, so projects with strict security requirements might be one? Also, license compliance is very easy (no notice required).
- adsan 1y agoI suppose it's meant as a minimal library meant to be modded for the specific usecase.
- bb88 1y agoEmbedded cpus is an easy one. You could maybe run an api server on a vape now.
- flohofwoe 1y agoTrivial 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.
- CyberDildonics 1y agoA small single file, pure C dependency that doesn't allocate memory can be a universal solution to a common problem if it works well.
- elcapitan 1y agoBeing 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).
- adrianN 1y agoIf 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.
- CyberDildonics 1y agoCan you link the parser you're talking about?
- binary132 1y agothe more the merrier
- EasyMark 1y agoA 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.
- Tempest1981 1y agoArduino, where you have KB, not GB or even MB.
- ozgrakkurt 1y agoThere doesn’t need to be a use case for everything, it is just a cool project