Page
Library
Module
Module type
Parameter
Class
Class type
Source
Equinoxe.JsonSourceThe Json module provides helpers to manipulate JSON objects.
Abstract type to represent JSON objects.
create ~kind () generates a new t object. Default kind value is `Obj.
of_string str takes a string str representing a JSON and transform it into an t object you can manipulate with this module.
geto json field_name returns the t value associated to the field_name.
geta json nth. returns the t value associated to the nth element in the json.
getao json (k,v) returns the t value object associated with the first element in an array of object which contains the tuple (k,v).
to_int_r json transforms the json object into an int result with a printable error in case of failure.
to_float_r json transforms the json object into an float result with a printable error in case of failure.
to_string json transforms the json into a string result with a printable error in case of failure.
to_unit_r json returns a result with a unit value. It unwraps the errors and returns unit if there is no error.
pp_r json prints the json if it's a well format json and returns Ok (). Otherwise, it returns an error.
export json returns a string that represents the json.