Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
module OneOrList : sig ... end
module OneOrArray : sig ... end
and t =
| JAny
| JAtom
Atoms are supposed to be strings, but other simple values are okay (int, float, bool)
*)| JNull
| JBool
| JInt
| JFloat
| JNumeric
| JString
| JEnum of enum
| JArray of t
| JOneOrArray of t
| JObject of t
| JSchema of {
name : string;
reject_extras : bool;
keys : schema_keys;
}
val object_entry_to_yojson : object_entry -> Yojson.Safe.t
val schema_keys_to_yojson : schema_keys -> Yojson.Safe.t
val enum_to_yojson : enum -> Yojson.Safe.t
val to_yojson : t -> Yojson.Safe.t
val make_enum : Yojson.Basic.t list -> t
val make_schema : name:string -> reject_extras:bool -> object_entry list -> t
val to_string : t -> string
val step_to_yojson : step -> Yojson.Safe.t
type path = step list
val path_to_yojson : path -> Yojson.Safe.t
type error =
| Extraneous of {
path : path;
name : string option;
extra : Yojson.Safe.t;
}
| Missing of {
}
| Type of {
path : path;
name : string option;
expected : t;
found : Yojson.Safe.t;
}
| Incorrect_value of {
path : path;
name : string option;
expected : Yojson.Basic.t list;
found : Yojson.Safe.t;
}
| Deserialization of {
message : string;
attempted : [ `JSON of Yojson.Safe.t | `String of string ];
}
| Processing of {
}
val error_to_yojson : error -> Yojson.Safe.t
val validate : ?path:path -> ?nullable:bool -> t -> Yojson.Safe.t -> error list
val error_to_string : ?emphasis:(string -> string) -> error -> string