3 ms·
A json serialization (no parsing) library is not going to be 10k+ lines, and it's going to be extremely simple. You can define a JSON AST type very simply, and
by whateveracct 5y ago
A json serialization (no parsing) library is not going to be 10k+ lines, and it's going to be extremely simple.
You can define a JSON AST type very simply, and then converting that to wire bytes is also quite trivial. Also simple to test via golden testing (you could even use property testing + shell out to jq to validate the json)
https://github.com/nikita-volkov/jsonifier https://github.com/nikita-volkov/jsonifier This one is nowhere near 10k lines - and it is heavily optimized and polished!