JSValueCreateJSONString top-level property
JSStringRef Function(JSContextRef ctx, JSValueRef value, int indent, Pointer<JSValueRef> exception)
JSValueCreateJSONString
final
Creates a JavaScript string containing the JSON serialized representation of a JS value.
ctx
(JSContextRef) The execution context to use.
value
(JSValueRef) The value to serialize.
indent
(unsigned) The number of spaces to indent when nesting. If 0, the resulting JSON will not contains newlines. The size of the indent is clamped to 10 spaces.
exception
(JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
@result
(JSStringRef) A JSString with the result of serialization, or NULL if an exception is thrown.
Implementation
final JSStringRef Function(
JSContextRef ctx,
JSValueRef value,
int indent,
Pointer<JSValueRef> exception,
)
JSValueCreateJSONString =
kLookup<
NativeFunction<
JSStringRef Function(
JSContextRef,
JSValueRef,
Uint32,
Pointer<JSValueRef>,
)
>
>('JSValueCreateJSONString').asFunction();