Small JSON library based on M*LIB.
This library allows parsing a JSON file, reading values from it and output it.
The type represening a JSON structure.
Initialize the JSON structure pointed by p to an empty JSON.
Initialize the JSON structure pointed by p to the contain of the file f which is supposed to be a JSON file.
Initialize the JSON structure pointed by p to the same value than 'o'.
Set the JSON structure pointed by p to the same value than 'o'.
Clear the JSON structure 'p'.
Set the JSON structure pointed by p to the contain of the file f which is supposed to be a JSON file.
Output the JSON structure 'p' into the FILE f.
Return the real value associated to the given address of the JSON structure 'p', or NAN if no real value is associated to this address.
The address is composed of a NULL terminated list of additional parameters of type 'const char *'. Each parameter is either the field associated to the structure or an index in a table (if it starts with '[').
Example: double d = json_get_real(p, "c", "[2]", "d", NULL); returns the value of p.c.[2].d
Return the boolean value associated to the given address of the JSON structure 'p' (false or true), or -1 if no boolean value is associated to this address.
Return a pointer to a constant string associated to the given address of the JSON structure 'p' (false or true), or -1 if no string value is associated to this address.
Return true if the given address is associated to a null value, or false if the given address doesn't exist or is not associated to a null value.
See test.c