Parser for a JSON element. Parsers are structured in a hierarchy:
- Root - handles top-level objects and arrays, as well as EOF
detection.
- Object - Parses
field: value pairs.
- Value - Parses a value, which may be an array or an object.
- Array - Nested within a Value; parses one level of an array.
Its children are Values (which may contain more array levels.
-
JSON is completely generic; the element parsers handle JSON's full
flexibility. Listeners attached to each parser determine if the
actual value in any position makes sense for the structure being
parsed.