JSON.stringify related

Get a JSON structure from the background like {"a":"aaa","key":"bbbb/sdfdsf"} (the value of the key in the original JSON is much more complicated, including many "/" symbols)

in the foreground JSON. stringify() this JSON, and found that the converted characters are {"a":"aaa","key":""}

The value of the key is empty...

Tested with the browser's console but there is no problem Searching on the

Internet First, see the official description

https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

there is a sentence that "undefined, arbitrary function and symbol value, in the sequence will be ignored (when present in a property value of a non-array object) or converted to null (when present in an array) during conversion." The

case should

be for future reference

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326858536&siteId=291194637