Hacker News new | past | comments | ask | show | jobs | submit login

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.



It'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: