Function

Jsonto_string

since: 1.2

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

Type: JsonNode

A JSON tree.

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

Type: gboolean

Whether the output should be prettyfied for printing.

Return value

Type: char*

The string representation of the node.

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