com.relogiclabs.json.schema.internal.grammar.JsonParser.g4 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of relogiclabs-json-schema Show documentation
Show all versions of relogiclabs-json-schema Show documentation
The New JSON Schema prioritizes simplicity, conciseness, and readability, making
it user-friendly and accessible without the need for extensive prior knowledge.
It offers efficient read-write facilities, precise JSON document definition
through various data types and functions, and extensibility to meet modern web
service diverse requirements.
parser grammar JsonParser;
options { tokenVocab = JsonLexer; }
json
: value EOF
;
value
: primitive
| object
| array
;
object
: LBRACE (property (COMMA property)*)? RBRACE
;
property
: STRING COLON value
;
array
: LBRACKET (value (COMMA value)*)? RBRACKET
;
primitive
: TRUE # PrimitiveTrue
| FALSE # PrimitiveFalse
| STRING # PrimitiveString
| INTEGER # PrimitiveInteger
| FLOAT # PrimitiveFloat
| DOUBLE # PrimitiveDouble
| NULL # PrimitiveNull
;