Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seagreen/hjsonschema
JSON Schema Draft 4 library (DEPRECATED)
https://github.com/seagreen/hjsonschema
Last synced: 2 months ago
JSON representation
JSON Schema Draft 4 library (DEPRECATED)
- Host: GitHub
- URL: https://github.com/seagreen/hjsonschema
- Owner: seagreen
- License: mit
- Archived: true
- Created: 2015-01-10T02:39:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T20:03:15.000Z (over 4 years ago)
- Last Synced: 2024-04-26T01:41:50.335Z (5 months ago)
- Language: Haskell
- Homepage:
- Size: 305 KB
- Stars: 45
- Watchers: 9
- Forks: 19
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: MIT-LICENSE.txt
Awesome Lists containing this project
README
# DEPRECATION NOTICE
`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).
However this flexibility came at the price of complicating the code. I don't think it was the right tradeoff, especially since situations where you'd want to change what validators make up a `Spec` at runtime seem rare.
Also, there are many parts of JSON Schema that `hjsonschema` doesn't implement properly (as you can see from the issue tracker). I'm hoping that a new JSON Schema library will come along that handles these correctly.
# Links
[Hackage](https://hackage.haskell.org/package/hjsonschema) / [GitHub](https://github.com/seagreen/hjsonschema) / [Travis CI](https://travis-ci.org/seagreen/hjsonschema)
# Example
See [here](https://github.com/seagreen/hjsonschema/blob/master/examples/Simple.hs).
# System dependencies
+ Requires [pcre](http://www.pcre.org/) (`pkgs.pcre` in Nixpkgs).
## Vendoring
+ `JSON-Schema-Test-Suite` is vendored from commit # c1b12bf699f29a04b4286711c6e3bbfba66f21e5 [here](https://github.com/json-schema-org/JSON-Schema-Test-Suite).
+ `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).