Function mozjs::jsapi::JS::ToJSON

source ·
pub unsafe extern "C" fn ToJSON(
    cx: *mut JSContext,
    value: Handle<Value>,
    replacer: Handle<*mut JSObject>,
    space: Handle<Value>,
    callback: Option<unsafe extern "C" fn(_: *const u16, _: u32, _: *mut c_void) -> bool>,
    data: *mut c_void
) -> bool
Expand description

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

In cases where JSON.stringify would return undefined, this function does not call |callback| at all.