Method

JavaScriptCoreValueto_json

since: 2.28

Declaration [src]

char*
jsc_value_to_json (
  JSCValue* value,
  guint indent
)

Description [src]

Create a JSON string of value serialization. If indent is 0, the resulting JSON will not contain newlines. The size of the indent is clamped to 10 spaces.

Available since: 2.28

Parameters

indent

Type: guint

The number of spaces to indent when nesting.

Return value

Type: char*

A null-terminated JSON string with serialization of value.

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