hjsonschema-1.6.3: JSON Schema library

Safe HaskellNone
LanguageHaskell2010

JSONSchema.Validator.Types

Documentation

data Validator schema val err Source #

Constructors

Validator 

Fields

  • _embedded :: val -> ([schema], [schema])

    The first list is embedded schemas that validate the same piece of data this schema validates (such as schemas embedded in allOf). The second is embedded schemas that validate a subset of that data (such as the schemas embedded in items).

    This is done to allow static detection of loops, though this isn't implemented yet (though the Draft4 code does do live loop detection during validation).

  • _validate :: val -> Value -> [err]
     

Instances

Profunctor (Validator schema) Source # 

Methods

dimap :: (a -> b) -> (c -> d) -> Validator schema b c -> Validator schema a d #

lmap :: (a -> b) -> Validator schema b c -> Validator schema a c #

rmap :: (b -> c) -> Validator schema a b -> Validator schema a c #

(#.) :: Coercible * c b => (b -> c) -> Validator schema a b -> Validator schema a c #

(.#) :: Coercible * b a => Validator schema b c -> (a -> b) -> Validator schema a c #

Functor (Validator schema val) Source # 

Methods

fmap :: (a -> b) -> Validator schema val a -> Validator schema val b #

(<$) :: a -> Validator schema val b -> Validator schema val a #