json-schema-0.7.4.1: Types and type classes for defining JSON schemas.

Safe HaskellNone
LanguageHaskell98

Data.JSON.Schema.Types

Description

Types for defining JSON schemas.

Synopsis

Documentation

class JSONSchema a where #

Class representing JSON schemas

Minimal complete definition

schema

Methods

schema :: Proxy a -> Schema #

Instances

JSONSchema Bool # 

Methods

schema :: Proxy * Bool -> Schema #

JSONSchema Double # 

Methods

schema :: Proxy * Double -> Schema #

JSONSchema Float # 

Methods

schema :: Proxy * Float -> Schema #

JSONSchema Int # 

Methods

schema :: Proxy * Int -> Schema #

JSONSchema Int8 # 

Methods

schema :: Proxy * Int8 -> Schema #

JSONSchema Int16 # 

Methods

schema :: Proxy * Int16 -> Schema #

JSONSchema Int32 # 

Methods

schema :: Proxy * Int32 -> Schema #

JSONSchema Int64 # 

Methods

schema :: Proxy * Int64 -> Schema #

JSONSchema Integer # 

Methods

schema :: Proxy * Integer -> Schema #

JSONSchema Word # 

Methods

schema :: Proxy * Word -> Schema #

JSONSchema Word8 # 

Methods

schema :: Proxy * Word8 -> Schema #

JSONSchema Word16 # 

Methods

schema :: Proxy * Word16 -> Schema #

JSONSchema Word32 # 

Methods

schema :: Proxy * Word32 -> Schema #

JSONSchema Word64 # 

Methods

schema :: Proxy * Word64 -> Schema #

JSONSchema () # 

Methods

schema :: Proxy * () -> Schema #

JSONSchema Scientific # 
JSONSchema Text # 

Methods

schema :: Proxy * Text -> Schema #

JSONSchema UTCTime # 

Methods

schema :: Proxy * UTCTime -> Schema #

JSONSchema Value # 

Methods

schema :: Proxy * Value -> Schema #

JSONSchema Text # 

Methods

schema :: Proxy * Text -> Schema #

JSONSchema a => JSONSchema [a] # 

Methods

schema :: Proxy * [a] -> Schema #

JSONSchema a => JSONSchema (Maybe a) # 

Methods

schema :: Proxy * (Maybe a) -> Schema #

HasResolution a => JSONSchema (Fixed a) # 

Methods

schema :: Proxy * (Fixed a) -> Schema #

JSONSchema a => JSONSchema (Set a) # 

Methods

schema :: Proxy * (Set a) -> Schema #

JSONSchema a => JSONSchema (Vector a) # 

Methods

schema :: Proxy * (Vector a) -> Schema #

(JSONSchema a, JSONSchema b) => JSONSchema (a, b) # 

Methods

schema :: Proxy * (a, b) -> Schema #

(IsString k, JSONSchema v) => JSONSchema (HashMap k v) # 

Methods

schema :: Proxy * (HashMap k v) -> Schema #

(IsString k, JSONSchema v) => JSONSchema (Map k v) # 

Methods

schema :: Proxy * (Map k v) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c) => JSONSchema (a, b, c) # 

Methods

schema :: Proxy * (a, b, c) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d) => JSONSchema (a, b, c, d) # 

Methods

schema :: Proxy * (a, b, c, d) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e) => JSONSchema (a, b, c, d, e) # 

Methods

schema :: Proxy * (a, b, c, d, e) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f) => JSONSchema (a, b, c, d, e, f) # 

Methods

schema :: Proxy * (a, b, c, d, e, f) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g) => JSONSchema (a, b, c, d, e, f, g) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h) => JSONSchema (a, b, c, d, e, f, g, h) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i) => JSONSchema (a, b, c, d, e, f, g, h, i) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j) => JSONSchema (a, b, c, d, e, f, g, h, i, j) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j, JSONSchema k) => JSONSchema (a, b, c, d, e, f, g, h, i, j, k) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j, k) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j, JSONSchema k, JSONSchema l) => JSONSchema (a, b, c, d, e, f, g, h, i, j, k, l) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j, k, l) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j, JSONSchema k, JSONSchema l, JSONSchema m) => JSONSchema (a, b, c, d, e, f, g, h, i, j, k, l, m) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j, k, l, m) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j, JSONSchema k, JSONSchema l, JSONSchema m, JSONSchema n) => JSONSchema (a, b, c, d, e, f, g, h, i, j, k, l, m, n) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j, k, l, m, n) -> Schema #

(JSONSchema a, JSONSchema b, JSONSchema c, JSONSchema d, JSONSchema e, JSONSchema f, JSONSchema g, JSONSchema h, JSONSchema i, JSONSchema j, JSONSchema k, JSONSchema l, JSONSchema m, JSONSchema n, JSONSchema o) => JSONSchema (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) # 

Methods

schema :: Proxy * (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) -> Schema #

data Schema #

A schema for a JSON value.

Constructors

Choice [Schema]

A choice of multiple values, e.g. for sum types.

Object [Field]

A JSON object.

Map Schema

A JSON object with arbitrary keys.

Array LengthBound Bool Schema

An array. The LengthBound represent the lower and upper bound of the array size. The value unboundedLength indicates no bound. The boolean denotes whether items have to be unique.

Tuple [Schema]

A fixed-length tuple of different values.

Value LengthBound

A string. The LengthBound denote the lower and upper bound of the length of the string. The value unboundedLength indicates no bound.

Boolean

A Bool.

Number Bound

A number. The Bound denote the lower and upper bound on the value. The value unbounded indicates no bound.

Constant Value

A Value that never changes. Can be combined with Choice to create enumerables.

Any

Any value is allowed.

Instances

Eq Schema # 

Methods

(==) :: Schema -> Schema -> Bool #

(/=) :: Schema -> Schema -> Bool #

Show Schema # 

data Field #

A field in an object.

Constructors

Field 

Fields

Instances

Eq Field # 

Methods

(==) :: Field -> Field -> Bool #

(/=) :: Field -> Field -> Bool #

Show Field # 

Methods

showsPrec :: Int -> Field -> ShowS #

show :: Field -> String #

showList :: [Field] -> ShowS #

data Bound #

A type for bounds on number domains. Use Nothing when no lower or upper bound makes sense

Constructors

Bound 

Fields

Instances

Eq Bound # 

Methods

(==) :: Bound -> Bound -> Bool #

(/=) :: Bound -> Bound -> Bool #

Show Bound # 

Methods

showsPrec :: Int -> Bound -> ShowS #

show :: Bound -> String #

showList :: [Bound] -> ShowS #

data LengthBound #

A type for bounds on lengths for strings and arrays. Use Nothing when no lower or upper bound makes sense

Constructors

LengthBound