metosin/scjsv

Name: scjsv

Owner: Metosin

Description: Simple JSON-Schema validator for Clojure

Created: 2015-04-04 10:46:43.0

Updated: 2018-05-23 10:42:19.0

Pushed: 2018-04-18 14:41:10.0

Homepage: null

Size: 41

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

scjsv License Build Status Dependencies Status

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

Latest version

Clojars Project

Usage
uire '[scjsv.core :as v])

 schema {:$schema "http://json-schema.org/draft-04/schema#"
         :type "object"
         :properties {:id {:type "integer"}}
         :required [:id]})

 validate (v/validator schema))

idate {:id 1})
l

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

Copyright © 2015-2018 Metosin Oy

Distributed under the Eclipse Public License, the same as Clojure.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.