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 Source #

Class representing JSON schemas

Minimal complete definition

schema

Methods

schema :: Proxy a -> Schema Source #

Instances
JSONSchema Bool Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Double Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Float Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Int Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy Int -> Schema Source #

JSONSchema Int8 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Int16 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Int32 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Int64 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Integer Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Word Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Word8 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Word16 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Word32 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Word64 Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema () Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

schema :: Proxy () -> Schema Source #

JSONSchema Scientific Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Text Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema UTCTime Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Value Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema Text Source # 
Instance details

Defined in Data.JSON.Schema.Types

JSONSchema a => JSONSchema [a] Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Defined in Data.JSON.Schema.Types

Methods

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

(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) Source # 
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 Source #

(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) Source # 
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 Source #

(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) Source # 
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 Source #

data Schema Source #

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

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Schema Source # 
Instance details

Defined in Data.JSON.Schema.Types

data Field Source #

A field in an object.

Constructors

Field 

Fields

Instances
Eq Field Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Field Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

showsPrec :: Int -> Field -> ShowS #

show :: Field -> String #

showList :: [Field] -> ShowS #

data Bound Source #

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

Constructors

Bound 

Fields

Instances
Eq Bound Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

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

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

Show Bound Source # 
Instance details

Defined in Data.JSON.Schema.Types

Methods

showsPrec :: Int -> Bound -> ShowS #

show :: Bound -> String #

showList :: [Bound] -> ShowS #

data LengthBound Source #

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

Defined in Data.JSON.Schema.Types

Show LengthBound Source # 
Instance details

Defined in Data.JSON.Schema.Types