Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
    Page
Library
Module
Module type
Parameter
Class
Class type
Source
Of_jsonSourceinclude Core.Applicative.S with type 'a t := 'a tinclude Core.Monad.S_without_syntax with type 'a t := 'a tt >>= f returns a computation that sequences the computations represented by two monad elements. The resulting computation first does t to yield a value v, and then runs the computation returned by f v.
ignore_m t is map t ~f:(fun _ -> ()). ignore_m used to be called ignore, but we decided that was a bad name, because it shadowed the widely used Stdlib.ignore. Some monads still do let ignore = ignore_m for historical reasons.
Wrap a t such that if it raises an exception, additional json context information will be added to help in debugging
Pull a value out of an object by key, and use another t to reify that. Raises if the key does not exist.
Same as using, except returns an 'a option in the event the key is missing. If the key is present the value will be passed on to the 'a t, even if it is null. If the value might be null, you probably want option instead.
Operator of using for path traversal: "foo" @. "bar" @. int. Raises for non-objects.
Operator of using_opt for path traversal with optional: "foo" @? "bar" @? int. Raises for non-objects.
A combination of using_opt and option, to preserve the previous semantics of the @? operator that didn't distinguish between "key not present" and "key present but null".
Do not use this function. Use @? or option. This only exists so that we can change @? without breaking all (untestable) uses of it. If you see this function used in an existing parser, and you are in a position to test it, you should update it to use either @? or option.
If you think you want to use this function -- if a key is sometimes absent, sometimes present but null, sometimes present but not null, and there's no semantic difference between the first two scenarios -- then you should still write that down with an explicit Option.join and a comment and some tests, because that's a crazy thing.
Suffix map for converting: "foo" @. int @> Satoshi.of_int
Simple forward composition: int @> Foo.of_int >>> Bar.of_foo
Simple accessors by type. Will raise if the type does not match
Always returns a float even if the JSON does not have a literal '.' in it
Returns None if the value is `Null, and runs t otherwise
Returns the string representation of either a JSON number or string.
Parse a JSON number or JSON string as an OCaml float or int. These are typically used as a last resort for inconsistent APIs.
Iterates over the keys of an object, passing each key to the ~f provided and running the resulting t on the value of that key. Collects all results as a list.
safe t runs a generic t but returns an option instead of an exception
a <|> b first runs a, and if it fails, it runs b. Will raise if b raises.
choice [a; b; c] returns the first parser that succeeds, or raises with the last if all raise.
A sexp embedded in a JSON string.
Turn an Array_as_tuple.t into a t that will expect a JSON array and parse each element as a different type. If any elements are left unparsed, an error is raised.