jojenki / Concordia

Concordia is a JSON schema language.
Apache License 2.0
9 stars 2 forks source link

Add Diagrams to the Wiki #8

Closed jojenki closed 11 years ago

jojenki commented 11 years ago

Add diagram images to the wiki.

jojenki commented 11 years ago

arraytype booleantype constlengtharray consttypearray definition doc fields numbertype objecttype optional remoteschema stringtype type types

jojenki commented 11 years ago

The grammar used to make these diagrams was:

Definition ::= '{' ObjectType '}' | '{' ArrayType '}'

Type ::= (BooleanType | StringType | NumberType | ObjectType | ArrayType | RemoteSchema) Doc? Optional?

Doc ::= '"doc":' string

Optional ::= '"optional":' ( 'true' | 'false' )

BooleanType ::= '"type":"boolean"'

NumberType ::= '"type":"number"'

StringType ::= '"type":"string"'

ObjectType ::= '"type":"object","schema":[' Fields? ']'

Fields ::= '{' ( '"name":' string ',' Type | RemoteSchema ) '}' ( ',' Fields )?

ArrayType ::= '"type":"array",' ( ConstTypeArray | ConstLengthArray )

ConstTypeArray ::= '"constType":{' Type '}'

ConstLengthArray ::= '"constLength":[' Types? ']'

Types ::= '{' Type '}' ( ',' Types )?

RemoteSchema ::= '"$ref":' string

jojenki commented 11 years ago

The site used to generate these was: http://railroad.my28msec.com/rr/ui