| Utility APIUtility API — Various utility functions |  | 
Includes
#include <json-glib/json-glib.h>
 
Description
Various utility functions.
 
Functions
json_from_string ()
JsonNode *
json_from_string (const char *str,
                  GError **error);
Parses the string in str
 and returns a JsonNode representing
the JSON tree. If str
 is empty, this function will return NULL.
In case of parsing error, this function returns NULL and sets
error
 appropriately.
Returns
a JsonNode, or NULL. 
[transfer full][nullable]
 
Since: 1.2
 
json_to_string ()
char *
json_to_string (JsonNode *node,
                gboolean pretty);
Generates a stringified JSON representation of the contents of
the passed node
.
Returns
the string representation of the JsonNode. 
[transfer full]
 
Since: 1.2