Function

Jsonto_string

Declaration [src]

char*
json_to_string (
  JsonNode* node,
  gboolean pretty
)

Description [src]

Generates a stringified JSON representation of the contents of the given node.

Available since:1.2

Parameters

node JsonNode
 

A JSON tree.

 The data is owned by the caller of the function.
pretty gboolean
 

Whether the output should be prettyfied for printing.

Return value

Returns: char*
 

The string representation of the node.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.