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

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]

Types and type classes for defining JSON schemas.

Documentation

See https://github.com/silkapp/json-schema/blob/master/README.md


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.4, 0.5, 0.6, 0.6.1, 0.6.1.1, 0.7.0.0, 0.7.0.1, 0.7.0.2, 0.7.1.0, 0.7.1.1, 0.7.2.0, 0.7.3.0, 0.7.3.1, 0.7.3.2, 0.7.3.3, 0.7.3.4, 0.7.3.5, 0.7.3.6, 0.7.3.7, 0.7.4.0, 0.7.4.1, 0.7.4.2
Change log CHANGELOG.md
Dependencies aeson (>=0.7 && <1.5), base (>=4.6 && <5), base-compat-batteries (>=0.10 && <0.11), containers (>=0.3 && <0.6), generic-aeson (>=0.2 && <0.3), generic-deriving (>=1.6 && <1.13), mtl (>=2.1 && <2.3), scientific (>=0.3 && <0.4), text (>=0.10 && <1.3), time (>=1.2 && <1.9), unordered-containers (>=0.2 && <0.3), vector (>=0.10 && <0.13) [details]
Tested with ghc ==7.6.3, ghc ==7.8.4, ghc ==7.10.3, ghc ==8.0.2, ghc ==8.2.2, ghc ==8.4.3
License BSD-3-Clause
Author Silk
Maintainer code@silk.co
Revised Revision 1 made by AdamBergmark at 2018-10-04T13:18:38Z
Category Data
Source repo head: git clone https://github.com/silkapp/json-schema.git
Uploaded by AdamBergmark at 2018-07-07T21:47:27Z
Distributions
Reverse Dependencies 7 direct, 3 indirect [details]
Downloads 22798 total (25 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-07-07 [all 1 reports]

Readme for json-schema-0.7.4.2

[back to package description]

json-schema

Build Status

json-schema is like XML schemas, but for JSON. It's haskell specific and has no relation to json-schema.org.

The package provides

  • An AST type Schema defining the structure of a JSON object.
  • A type class JSONSchema to define a schema for a type.
  • Combinators for defining schemas.
  • A module for validating Aeson values against schemas.
  • Built-in instances matching aeson's.
  • A Generics module matching aeson instances generated by generics-aeson

If you use another library for generating JSON instances (such as aeson's built-in generics/template haskell) or write aeson instances by hand you will not get matching JSONSchema instances if you use json-schema's generics module.

This package assumes that your ToJSON and FromJSON instances match.

Installation

This package is available on hackage

$ cabal install json-schema

Examples

see the examples folder or The test suite.