git.iko.soy/typeable/hjsonschema
on master help sign in
Update project status.
commit094324e1405ce46d214f258fd47b5e9d1d5d9a4f authorIan Grant Jeffries <ian@housejeffries.com> dateWed 7 Mar 2018, 23:45 (9 years ago) parentb8b5b8d
3 files changed+12−39
README.md+12−38 logo.jpg run-stack-haddock−1
README.md+12−38
@@ -1,50 +1,32 @@
1−![hjsonschema logo](./logo.jpg)
1+# Summary
22
3−A Haskell implementation of [JSON Schema](http://json-schema.org/) ([Draft 4](https://github.com/json-schema-org/json-schema-spec/wiki/Specification-Links#draft-4)).
3+A Haskell implementation of [JSON Schema](http://json-schema.org/) ([Draft 4](http://json-schema.org/specification-links.html)).
44
55[Hackage](https://hackage.haskell.org/package/hjsonschema) / [GitHub](https://github.com/seagreen/hjsonschema) / [Travis CI](https://travis-ci.org/seagreen/hjsonschema)
66
7−# Notes
8−
9−+ As of 2017 [json-schema-org](https://github.com/json-schema-org/json-schema-spec) has begun releasing new drafts of the standard. Once this work stabilizes `hjsonschema` will add coverage for the latest draft.
10−
11−+ Requires [pcre](http://www.pcre.org/) (`pkgs.pcre` in Nixpkgs).
12−
13−+ Schemas with circular references can cause infinite loops. hjsonschema does loop detection but it may not be solid yet -- please open an issue if you find a situation where it fails.
14−
157# Example
168
179See [here](https://github.com/seagreen/hjsonschema/blob/master/examples/Simple.hs).
1810
19−# Tests
20−
21−Run all tests:
22−
23−`stack test`
24−
25−Run only local tests:
11+# Design
2612
27−`stack test hjsonschema:local`
13+`hjsonschema` was an attempt to build a very modular JSON Schema library. Validators have [a concrete type](src/JSONSchema/Validator/Types.hs) and can be mixed and matched into new [Specs](src/JSONSchema/Types.hs).
2814
29−Run remote tests (makes GETs to json-schema.org, also temporarily starts an HTTP server on port 1234):
15+However this flexibility comes at the price of complicating the code. I'm no longer sure it was the right tradeoff, especially since situations where you'd want to change what validators make up a `Spec` at runtime seem rare.
3016
31−`stack test hjsonschema:remote`
17+Also, there are edge cases of JSON Schema that `hjsonschema` doesn't implement properly (as you can see from the issue tracker). My motivation to fix them myself has ended. However, I'll still maintain the library, give feedback on issues, and merge PRs. I'd also be happy to advise any Haskellers who are interested in writing their own JSON Schema libraries.
3218
33−# Details
19+# System dependencies
3420
35−## Goals
36−
37−+ Be a correct and fast implementation of the spec.
38−
39−+ Be a useful reference for implementers in other languages. Haskell's high level nature, expressive type system and referential transparency suit this purpose well.
21++ Requires [pcre](http://www.pcre.org/) (`pkgs.pcre` in Nixpkgs).
4022
41−## Issues
23+# Tests
4224
43−+ Doesn't pass all of the tests in the [language agnostic test suite](https://github.com/json-schema/JSON-Schema-Test-Suite). See the issue list for details.
25+Run all: `stack test`
4426
45−+ Uses the [pcre-heavy](https://hackage.haskell.org/package/pcre-heavy) regular expression library for the "pattern" validator. It should use a library based on the ECMA 262 regex dialect, which the [spec](http://json-schema.org/latest/json-schema-validation.html#anchor33) requires.
27+Run only local tests: `stack test hjsonschema:local`
4628
47−+ Currently doesn't support the optional `"format"` validators.
29+Run only remote tests (temporarily starts an HTTP server on port 1234 and makes GETs to json-schema.org): `stack test hjsonschema:remote`
4830
4931## Vendoring
5032
@@ -53,11 +35,3 @@ Run remote tests (makes GETs to json-schema.org, also temporarily starts an HTTP
5335+ `src/draft4.json` is from commit # c1b12bf699f29a04b4286711c6e3bbfba66f21e5 [here](https://github.com/json-schema/json-schema). The [root ref in remote ref](./JSON-Schema-Test-Suite/tests/draft4/refRemote.json) test has been modified to fix [#175](https://github.com/json-schema-org/JSON-Schema-Test-Suite/issues/175).
5436
5537+ `.travis.yml` was created with `make_travis_yml_2.hs` commit # ea6c7d177a97bfbfb2fdc4deba943d60d2aff199.
56−
57−## Credits
58−
59−[TJ Weigel](http://tjweigel.com/) created the logo.
60−
61−[Tim Baumann](https://github.com/timjb) wrote [aeson-schema](https://hackage.haskell.org/package/aeson-schema), on which hjsonschema's test code and its implementation of `SchemaGraph` were based.
62−
63−[Julian Berman](https://github.com/Julian) maintains the fantastic [language agnostic test suite](https://github.com/json-schema/JSON-Schema-Test-Suite).
logo.jpgdeleted

Binary file not shown.

run-stack-haddockdeleted−1
@@ -1 +0,0 @@
1−../stack-haddock-upload/stack-haddock-upload hjsonschema # 1.2.0.1