The json-schema package

[Tags:bsd3, library, test]

Types and type classes for defining JSON schemas.



[Skip to Readme]


Versions 0.4, 0.5, 0.6, 0.6.1,,,,,,,,,,,,,,,,,
Change log
Dependencies aeson (>=0.7 && <1.3), base (>=4.4 && <5), containers (>=0.3 && <0.6), generic-aeson (==0.2.*), generic-deriving (>=1.6 && <1.12), ghc-prim (==0.2.*), mtl (>=2.1 && <2.3), scientific (==0.3.*), tagged (>=0.2 && <0.9), text (>=0.10 && <1.3), time (>=1.2 && <1.9), unordered-containers (==0.2.*), vector (>=0.10 && <0.13) [details]
License BSD3
Author Silk
Category Data
Source repository head: git clone
Uploaded Fri Dec 18 18:27:39 UTC 2015 by AdamBergmark
Updated Sun Apr 23 11:04:03 UTC 2017 by AdamBergmark to revision 8
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 5526 total (67 in the last 30 days)
0 []
Status Docs available [build log]
Last success reported on 2015-12-18 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for json-schema

Readme for json-schema-


Build Status

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

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.


This package is available on hackage

$ cabal install json-schema


see the examples folder or The test suite.