JSON Parser

2beaucoup edited this page Sep 21, 2012 · 6 revisions

The JSON Parser example lives in the org.parboiled.examples.json package and shows a complete JSON Parser built with parboiled for Scala.
It builds an AST representation of the parsed JSON source and exercises many of parboileds features. As such it is a very good starting point for your own parboiled for Scala project.

The three contained Scala classes contain the following parser versions:

Class Parser
JsonParser0 Basic recognizer grammar without any actions
JsonParser1 Full JSON parser with actions building an AST
JsonParser2 Same as JsonParser1 but with most types being made explicit (rather than inferred), worth a look if JsonParser1 is unclear
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.