public class JSON extends JSValue
Modifier and Type | Method and Description |
---|---|
static JSValue |
parse(JSContext ctx,
java.lang.String json)
Creates a new JavaScript value from a JSString JSON string
|
static java.lang.String |
stringify(JSContext ctx,
java.lang.Object object)
Gets a JSON string representation of any object
|
static java.lang.String |
stringify(JSValue value)
Gets a JSON string representation of any object
|
equals, getContext, hashCode, isArray, isBoolean, isDate, isEqual, isFloat32Array, isFloat64Array, isInstanceOfConstructor, isInt16Array, isInt32Array, isInt8Array, isNull, isNumber, isObject, isStrictEqual, isString, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toNumber, toObject, toString, valueHash, valueRef
public static java.lang.String stringify(JSValue value)
value
- The JSValue to convert to JSONpublic static java.lang.String stringify(JSContext ctx, java.lang.Object object)
ctx
- A js contextobject
- The object to convert to JSONpublic static JSValue parse(JSContext ctx, java.lang.String json)
ctx
- The context in which to create the valuejson
- The string containing the JSON