Schema grammar
<schema> ::= <class> | <lazy> | <logical> | <predicate> | <shape> <class> ::= any | boolean | number | string <lazy> ::= <logical> ::= | | <predicate> ::= /.../ | <shape> ::= false | true | "..." | <number> | <schema> | null | <property> ... <property> ::= "...": <schema> | "...":
Entry points
json true | false
json |
json json | throw mismatch
Mismatches
mismatch ::= Mismatch value | MismatchAt mismatch index | Mismatches mismatches
mismatch
Extending
For example, given
const empty =
the expression
matches any non-empty array.
Example
const SetOfProducts = id: number name: string price: tags: dimensions: warehouselocation: