4 ms·
The beauty of JSON is it's rigid structure, especially from a parser standpoint. The number of "may"s in the JSON5 spec sounds like hell to implement.
by candiddevmike 2y ago
The beauty of JSON is it's rigid structure, especially from a parser standpoint. The number of "may"s in the JSON5 spec sounds like hell to implement.
- supriyo-biswas 2y agoIt's not too much work, although things like unquoted tokens do introduce some ambiguity (a technical term for when two productions have overlapping start symbols) in the grammar. This is usually an academic concern though, as ambiguity can be resolved through backtracking, and as long as you don't require too much of it, it's fine. I've implemented a hand-written recursive descent parser for something that is very similar to JSON5, and it wasn't difficult overall.