Method

JsonGeneratorto_data

Declaration [src]

gchar*
json_generator_to_data (
  JsonGenerator* generator,
  gsize* length
)

Description [src]

Generates a JSON data stream from generator and returns it as a buffer.

Parameters

length

Type: gsize*

Return location for the length of the returned buffer.

The argument will be set by the function.
The argument can be NULL.

Return value

Type: gchar*

A newly allocated string holding a JSON data stream.

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