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

Safe HaskellNone
LanguageHaskell2010

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 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Bool -> Schema #

JSONSchema Double # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Double -> Schema #

JSONSchema Float # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Float -> Schema #

JSONSchema Int # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int -> Schema #

JSONSchema Int8 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int8 -> Schema #

JSONSchema Int16 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int16 -> Schema #

JSONSchema Int32 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int32 -> Schema #

JSONSchema Int64 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int64 -> Schema #

JSONSchema Integer # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Integer -> Schema #

JSONSchema Word # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Word -> Schema #

JSONSchema Word8 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Word8 -> Schema #

JSONSchema Word16 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Word16 -> Schema #

JSONSchema Word32 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Word32 -> Schema #

JSONSchema Word64 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Word64 -> Schema #

JSONSchema () # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy () -> Schema #

JSONSchema Scientific # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Text # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Text -> Schema #

JSONSchema UTCTime # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy UTCTime -> Schema #

JSONSchema Value # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Value -> Schema #

JSONSchema Text # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Text -> Schema #

JSONSchema a => JSONSchema [a] # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy [a] -> Schema #

JSONSchema a => JSONSchema (Maybe a) # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

HasResolution a => JSONSchema (Fixed a) # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

JSONSchema a => JSONSchema (Set a) # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

JSONSchema a => JSONSchema (Vector a) # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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) # 
Instance details

Defined in Data.JSON.Schema.Types

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 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Schema # 
Instance details

Defined in Data.JSON.Schema.Types

data Field #

A field in an object.

Constructors

Field 

Fields

Instances
Eq Field # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Field # 
Instance details

Defined in Data.JSON.Schema.Types

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 # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Bound # 
Instance details

Defined in Data.JSON.Schema.Types

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 
Instances
Eq LengthBound # 
Instance details

Defined in Data.JSON.Schema.Types

Show LengthBound # 
Instance details

Defined in Data.JSON.Schema.Types