A json string eg.
{"test": "\u4f60\u597d"}
parse it jsonObj = JSON.parse(s), then generate it newStr = JSON.generate(jsonObj)
the content of "newStr" is now
{"test": "你好"}
which is supposed to be identical with the original string( {"test": "\u4f60\u597d"} ).
A json string eg.
parse it
jsonObj = JSON.parse(s), then generate itnewStr = JSON.generate(jsonObj)the content of "newStr" is now
which is supposed to be identical with the original string(
{"test": "\u4f60\u597d"}).