jesse (JSon Schema Erlang) is an implementation of a JSON Schema validator for Erlang.
Go to file
2013-02-19 18:57:37 +01:00
doc Initial commit 2012-06-18 17:57:59 +02:00
src Fix some formating issues 2013-02-19 18:57:37 +01:00
test Minor changes in jesse test suite 2013-02-19 18:57:37 +01:00
.gitignore Update .gitignore 2013-02-19 18:57:37 +01:00
.gitmodules Add JSON-Schema-Test-Suite as a submodule 2013-02-19 18:57:37 +01:00
AUTHORS Initial commit 2012-06-18 17:57:59 +02:00
CHANGELOG.md Initial commit 2012-06-18 17:57:59 +02:00
cover.spec Add cover.spec 2013-02-19 18:57:37 +01:00
LICENSE Add LICENSE 2012-10-02 14:47:56 +02:00
Makefile Minor change in Makefile 2013-02-19 18:57:37 +01:00
README.md Initial commit 2012-06-18 17:57:59 +02:00
rebar Initial commit 2012-06-18 17:57:59 +02:00
rebar.config Add additional configuration for eunit to rebar.config 2013-02-19 18:57:37 +01:00
rebar.tests.config Add rebar.tests.config 2013-02-19 18:57:37 +01:00

jesse

jesse (JSon Schema Erlang) is an implementation of a json schema validator for Erlang. Currently, it implements most of "useful" parts of the following standard draft: http://tools.ietf.org/html/draft-zyp-json-schema-03.

A list of non-implemented features could be found in jesse_schema_validator.erl. As soon as there are new drafts coming, the implementation will be updated accordingly.

Quick start

  • Add jesse as a rebar dependency to your application.
  • Update schema definitions:
1> jesse:update_schema("path/to/json/schema/files/", fun jiffy:decode/1)
  • Use the validation function whenever you need:
2> jesse:validate("message-v1.json#", jiffy:decode(<<"{\"text\": \"some text\"}">>)).
{ok,{[{<<"text">>,<<"some text">>}]}}
3> jesse:validate("message-v1.json#", jiffy:decode(<<"{\"text\": 42}">>)).
{error,{data_invalid,{<<"text">>,42},
                     not_string,
                     {[{<<"title">>,<<"Message text">>},
                       {<<"type">>,<<"string">>},
                       {<<"example">>,<<"hello, world">>}]}}}

More documentation is coming soon...