JsonSchemaA simpler schema than http://json-schema.org
and jschema = {sid : string option;identificator
*)sdescr : string option;description
*)stype : jtype option;a type with possibly extra information
*)sdefault : Yojson.Safe.t option;the default value
*)mutable saddenum : jschema list;additional schemata that were loaded separately
*)}a schema for a jvalue
extra schema information for an array jvalue
and jobj = {sprops : (string * jschema) list;properties
*)spatternprops : (string * jschema) list;regular expression properties
*)sadditionalprops : bool;are all properties acounted in the schema
*)srequired : string list;list of required properties
*)}extra schema information for an object jvalue
An exception that indicates that some jschema is was invalid.
An exception that indicates that some jvalue was not valid according to some jschema.
val collectIds : jschema -> string listCollect all ids from the jschema.
val validate : jschema -> Yojson.Safe.t -> unitCall to validate s v validates the jvalue v in the jschema s. Invalidness is communicated using the exception JsonMalformed.
val fromJson : Yojson.Safe.t -> jschemaConvert a jvalue to a jschema if possible. Raise JsonSchemaMalformed otherwise.