Module Misc.JsonSource
JSON utilities
Simple (and not very robust) JSON generation utilities.
Everything is string based, creating lots of intermediate strings. Moreover, Json.string uses a custom string encoding based on the code for the format specifier %S, but with escapes for \u00HH instead of OCaml's \DDD.
field name value creates a JSON field with the given name and value.
string value formats a string value as a JSON string.
int value formats an integer value as a JSON number.
float value formats a float value as a JSON number.
object_ fields creates a JSON object from a list of field strings.
array items creates a JSON array from a list of item strings.
null is the JSON null literal.
option f opt formats an optional value as JSON. Returns the JSON null literal for None, or applies f to the value for Some v.