Add comment JSON problem

JSON has two data structures:

Name / value pairs: key: value style;
ordered list of values: that Array;
and as long as the description is not consistent with the two structures are not supported above, and an error in the JSON document
add a comment or // / ** / is not allowed in the JSON file
so JSON how to add a comment?
1. key: value added;

{
"查询的返回结果":"",
"resultcode":"200",
"查询结果":"",
"reason": "查询成功!"
}

2. JSON.minify () function;

You can delete test.json file notes and space through the use of JSON.minify (test.json), so that the .json file with comments by the compiler

Guess you like

Origin www.cnblogs.com/youpeng/p/10991874.html