Json.stringify (): Value (Object,array,string,number ...) Serialized as JSON string Json.parse (): Parsing JSON data into JS native value Tojson (), as the second parameter in json.stringify (function filter) complements, it is important to understand the internal order. Suppose that an object is passed into the Json.stringify () serialized object in the following order: (1) The method is called if the Tojson () method is present and can be used to obtain a valid value. Otherwise, the serialization is performed in the default order (2) If the second parameter is provided, the function filter is applied, and the value of the passed-in function filter is the value returned by step (1). (3) The corresponding serialization of each value returned by step (2). (4) If a third parameter is provided, the corresponding format operation is performed. Json.tojsonstring (): Object to JSON string.
Json.stringify (), Json.parse (), ToJSON () method use