hjsonschema-0.6.0.2: JSON Schema Draft 4 library

Safe HaskellNone
LanguageHaskell2010

Data.JsonSchema.Validators

Contents

Description

This is generally meant to be an internal module. It's only exposed in case you want to make your own Spec. If you just want to use JSON Schema Draft 4 use the preassembled draft4 instead.

Synopsis

Number Validators

String Validators

Array Validators

items :: ValidatorGen Source

Also covers additionalItems.

additionalItems :: ValidatorGen Source

Not included directly in the draft4 spec hashmap because it always validates data unless items is also present. This is because items defaults to {}.

Object Validators

runAdditionalProperties :: ValidatorGen Source

An implementation of the "additionalProperties" keyword that never disables itself. Not included directly in the draft4 spec hashmap.

Any Validators

enum :: ValidatorGen Source

http://json-schema.org/latest/json-schema-validation.html#anchor76

The value of this keyword MUST be an array.
This array MUST have at least one element.
Elements in the array MUST be unique.

Elements in the array MAY be of any type, including null.

NOTE: We actually respect this, and don't build the validator if any of the elements aren't unique.