hjsonschema: JSON Schema library

[ data, deprecated, library, mit ] [ Propose Tags ]
Deprecated
Versions [RSS] 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.5.0.0, 0.5.1.0, 0.5.1.1, 0.5.1.2, 0.5.1.3, 0.5.2.0, 0.5.2.1, 0.5.2.2, 0.5.3.0, 0.5.3.1, 0.5.3.2, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.7.0.0, 0.7.1.0, 0.8.0.0, 0.8.0.1, 0.9.0.0, 0.10.0.0, 0.10.0.1, 0.10.0.2, 0.10.0.3, 1.0.0.0, 1.1.0.0, 1.1.0.1, 1.2.0.0, 1.2.0.1, 1.2.0.2, 1.3.0.0, 1.3.0.1, 1.4.0.0, 1.5.0.0, 1.5.0.1, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.9.0, 1.10.0 (info)
Change log changelog.txt
Dependencies aeson (>=0.7 && <0.11), base (>=4.7 && <4.9), bytestring (>=0.10 && <0.11), containers (>=0.5 && <0.6), file-embed (>=0.0.8 && <0.0.10), hashable (>=1.2 && <1.3), hjsonpointer (>=0.2 && <0.3), hjsonschema, http-client (>=0.4.9 && <0.5), http-types (>=0.8 && <0.10), mtl (>=2.2.1 && <2.3), regexpr (>=0.5 && <0.6), scientific (>=0.3 && <0.4), text (>=1.2 && <1.3), transformers (>=0.4.2 && <0.5), unordered-containers (>=0.2 && <0.3), vector (>=0.10 && <0.12) [details]
License MIT
Author Ian Grant Jeffries
Maintainer ian@housejeffries.com
Category Data
Home page https://github.com/seagreen/hjsonschema
Source repo head: git clone git://github.com/seagreen/hjsonschema.git
Uploaded by seagreen at 2015-12-11T21:49:00Z
Distributions
Reverse Dependencies 6 direct, 1 indirect [details]
Executables example
Downloads 32476 total (114 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-12-11 [all 1 reports]

Readme for hjsonschema-0.8.0.1

[back to package description]

hjsonschema logo

A Haskell implementation of the current JSON Schema specification (Draft 4).

Hackage / GitHub / Travis CI

NOTE: You currently CANNOT use untrusted JSON data to make schemas. Schemas with circular references can cause infinite loops. This is being addressed: see the issue list.

Example

See Example.hs on GitHub.

Tests

Install

git submodule update --init

Run

Will run self-contained:

cabal test local

Will start an HTTP server temporarily on port 1234:

cabal test remote

Details

Goals

  • Be a correct and fast implementation of the spec.

  • Be a useful reference for implementers in other languages. Haskell's high level nature, expressive type system and referential transparency suit this purpose well.

Good Parts

  • Passes all the tests in the language agnostic test suite.

  • Very modular, which should make it easy to support future versions of the specification.

Bad Parts

  • Uses the regexpr regular expression library for the "pattern" validator. It should use a library based on the ECMA 262 regex dialect, which the spec requires.

Notes

  • draft4.json is from commit # cc8ec81ce0abe2385ebd6c2a6f2d6deb646f874a here.

Credits

TJ Weigel created the logo.

Tim Baumann wrote aeson-schema, on which hjsonschema's test code and its implementation of SchemaGraph were based.

Julian Berman maintains the fantastic language agnostic test suite.