Awesome Open Source
Awesome Open Source

scjsv License Build Status Dependencies Status

Simple Clojure JSON-Schema Validator - on top of java-json-tools/json-schema-validator.

scjsv supports JSON Schema up to draft-04. If you need support for draft-07, see luposlip/json-schema.

Latest version

Clojars Project

scjsv requires Java 1.8 or later.


  • API docs
  • validator creates a Clojure data structure validator against the given JSON Schema.
  • json-validator created a JSON string validator against the given JSON Schema.
  • JSON Schemas can be represented either as JSON strings or as Clojure Maps.
(require '[scjsv.core :as v])

(def schema {:$schema ""
             :type "object"
             :properties {:id {:type "integer"}}
             :required [:id]})

(def validate (v/validator schema))

(validate {:id 1})
; nil

(validate {})
; ({:domain "validation"
;   :instance {:pointer ""}
;   :keyword "required"
;   :level "error"
;   :message "object has missing required properties ([\"id\"])"
;   :missing ["id"]
;   :required ["id"]
;   :schema {:loadingURI "#" :pointer ""}})


Copyright © 2015-2018 Metosin Oy.

Distributed under the Eclipse Public License 2.0.

Alternatives To Scjsv
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Java (411,578
Json (40,048
Validator (20,396
Clojure (19,555
Schema (14,612
Json Schema (1,824