Module B0_web.Jsonq
JSON value queries.
Queries
val null : unit t
null
queries a null JSON value.
val bool : bool t
bool
queries a boolean JSON value.
val int : int t
int
queries a float JSON value andtruncate
s it.
val float : float t
float
queries a float JSON value.
val string : string t
string
queries a string JSON value.
val mem : string -> 'a t -> ('a -> 'b) t -> 'b t
mem name q o
queries a JSON objecto
's member namedname
withq
.
val mem_opt : string -> 'a t -> ('a option -> 'b) t -> 'b t
mem_opt name q
queries a JSON objecto
's optional member namedname
withq
.
val obj : 'a -> 'a t
obj v
queries an object and returnsv
.
val query : 'a t -> Json.t -> ('a, string) Stdlib.result
query q j
queries a JSON valuej
withq
.