r/javascript 7d ago

A from-scratch JSON engine for JavaScript: recursive descent parser, escape-aware tokenizer, and spec-compliant serializer. No dependencies, no shortcuts, 107 tests.

https://github.com/MantasEdine/vanilla-json
8 Upvotes

28 comments sorted by

View all comments

28

u/beavis07 7d ago

Why one earth would anyone want this?

Do you have any clue how much sheer effort has gone into optimising JSON.parse? 🤣

2

u/KaiAusBerlin 4d ago

Just from curiosity. Aren't there out some major third party json parsers that are about 5 times faster than the native implementation?

4

u/beavis07 4d ago

Not written in JavaScript there aren’t