Package org.petitparser.grammar.json

This package contains a complete implementation of JSON. JsonParserDefinition builds nested Java objects from a given JSON string. Consider the following code:
 Parser json = new JsonParser();
 Object result = json.parse('{"a": 1, "b": [2, 3.4], "c": false}');
 System.out.println(result.value);  // {a: 1, b: [2, 3.4], c: false}
 
The grammar definition JsonGrammarDefinition can be subclassed to construct other objects.
Skip navigation links

Copyright © 2018 PetitParser. All rights reserved.