jesse (JSon Schema Erlang) is an implementation of a JSON Schema validator for Erlang.
Go to file
2012-08-15 15:34:39 +02:00
doc Initial commit 2012-06-18 17:57:59 +02:00
src Fix too long line lenght in jesse_json_path.erl 2012-08-15 15:34:39 +02:00
.gitignore Initial commit 2012-06-18 17:57:59 +02:00
AUTHORS Initial commit 2012-06-18 17:57:59 +02:00
CHANGELOG.md Initial commit 2012-06-18 17:57:59 +02:00
LICENSE Initial commit 2012-06-18 17:57:59 +02:00
Makefile Initial commit 2012-06-18 17:57:59 +02: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 Initial commit 2012-06-18 17:57:59 +02: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...