Skip to content
Native Clojure implementation of jsonschema, including a validator
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec
src/juxt/jsonschema
test/juxt/jsonschema
.gitignore
LICENSE
README.adoc
deps.edn
todo.org

README.adoc

JSON Schema for Clojure(Script)

Almost all Clojure implementations of json schema validators wrap Java libraries. This is generally a good idea.

However, there are some reasons why a native Clojure implementation can be useful:

  • Java libraries compile jsonschema to object graphs, making them inaccessible to many of the data functions in the Clojure core library.

  • On the front-end, it can be painful to have to convert Clojure data to JavaScript objects simply for the purposes of calling a jsonschema validation such as Ajv.

  • Extensibility: JSON Schema is designed to be extended with additional vocabularies. Clojure has some nice open-for-extension mechanisms.

  • Size: Implementing JSON Schema is not that scary in a language as nice as Clojure. There’s not so much code to read, understand and possibly extend.

Scope

This library implements JSON Schema 'draft7' (draft-handrews-json-schema-validation-01).

Status

Caution
This is a new project, of alpha status. There may be future incompatible changes ahead.

Testing

This library is tested with the official JSON-Schema-Test-Suite.

All 444 non-optional tests currently pass.

Alternative implementations

You can’t perform that action at this time.