Converts a JavaScript Object Notation (JSON) string into an object.
A valid JSON string.
Optional
reviver: (this: any, key: string, value: any) => anyA function that transforms the results. This function is called for each member of the object. If a member contains nested objects, the nested objects are transformed before the parent object is.
Optional
reviver: (this: any, key: string, value: any) => anyConverts a JavaScript value to a JavaScript Object Notation (JSON) string.
A JavaScript value, usually an object or array, to be converted.
Optional
replacer: (this: any, key: string, value: any) => anyA function that transforms the results.
Optional
space: string | numberAdds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
A JavaScript value, usually an object or array, to be converted.
Optional
replacer: (string | number)[]An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.
Optional
space: string | numberAdds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
Optional
replacer: (this: any, key: string, value: any) => anyOptional
space: string | number
Zh
一个内置的 JSON 对象,包含用于解析和序列化 JSON 的方法。
En
An intrinsic object that provides methods to parse and serialize JSON (JavaScript Object Notation).