A walkthrough of building a minimal JSON parser in Java called femtojson. Starting from the official JSON grammar in McKeeman form, the author transforms it into a simpler grammar with one-character lookahead, then implements it as a recursive descent parser. The resulting library is only 12KB, emits standard Java types (Map,

5m read timeFrom mostlynerdless.de
Post cover image
Table of contents
UsageJSON GrammarTransforming the GrammarImplementing the RulesConclusionAuthorRelated Posts:

Sort: