Safe Haskell | None |
---|---|
Language | Haskell98 |
Types for defining JSON schemas.
Documentation
A schema for a JSON value.
Choice [Value] | A choice of multiple values, e.g. for sum types. |
Object [Field] | A JSON object. |
Map Value | A JSON object with arbitrary keys. |
Array Int Int Bool Value | An array. The integers represent the lower and upper bound of the array size. The value -1 indicates no bound. The boolean denotes whether items have to unique. |
Tuple [Value] | A fixed-length tuple of different values. |
Value Int Int | A string. The integers denote the lower and upper bound of the length of the string. The value -1 indicates no bound. |
Boolean | |
Number Int Int | A number. The integers denote the lower and upper bound on the value. The value -1 indicates no bound. |
Null | |
Any |
A field in an object.
class JSONSchema a where Source
Class representing JSON schemas
JSONSchema Bool | |
JSONSchema Int | |
JSONSchema Integer | |
JSONSchema Word32 | |
JSONSchema () | |
JSONSchema Text | |
JSONSchema a => JSONSchema [a] | |
JSONSchema a => JSONSchema (Maybe a) | |
JSONSchema a => JSONSchema (Vector a) | |
(IsString k, JSONSchema v) => JSONSchema (HashMap k v) | |
(IsString k, JSONSchema v) => JSONSchema (Map k v) |