Function mozjs_sys::jsapi::JS_Stringify

source ·
pub unsafe extern "C" fn JS_Stringify(
    cx: *mut JSContext,
    value: MutableHandle<Value>,
    replacer: Handle<*mut JSObject>,
    space: Handle<Value>,
    callback: JSONWriteCallback,
    data: *mut c_void,
) -> bool
Expand description

Performs the JSON.stringify operation, as specified by ECMAScript, except writing stringified data by exactly one call of |callback|, passing |data| as argument.

In cases where JSON.stringify would return undefined, this function calls |callback| with the string “null”.