An easy interface on top of the Jsonm
library.
This version provides more convenient (but far less flexible)
input and output functions that go to and from string
values.
This avoids the need to write signal code, which is useful for
quick scripts that manipulate JSON.
More advanced users should go straight to the Jsonm
library and
use it directly, rather than be saddled with the Ezjsonm interface
below.
Write a JSON document to an output channel.
Write a JSON document to a string. This goes via an intermediate buffer and so may be slow on large documents.
All the following accessor functions expect the provided JSON
document to be of a certain kind. In case this is not the case,
Parse_error
is raised.
Convert a JSON object to a (possibly non-valid UTF8)
string. Return None
if the JSON object is not a valid string.
Convert a JSON object to a (possibly non-valid UTF8) string.