pub unsafe extern "C" fn JSValueCreateJSONString(
ctx: JSContextRef,
value: JSValueRef,
indent: c_uint,
exception: *mut JSValueRef,
) -> JSStringRef
Expand description
Creates a JavaScript string containing the JSON serialized representation of a JS value.
ctx
: The execution context to use.value
: The value to serialize.indent
: The number of spaces to indent when nesting. If0
, the resulting JSON will not contains newlines. The size of the indent is clamped to10
spaces.exception
: A pointer to aJSValueRef
in which to store an exception, if any. PassNULL
if you do not care to store an exception.
Returns a JSStringRef
with the result of serialization, or NULL
if an exception is thrown.