json has strict requirements on the format. You cannot add = directly to the json file. You must follow the format of "key":.... You can assign the obtained json object to a variable in js
The json format is wrong. You can copy this object to a js file and use JSON.stringify to convert it and then copy it to the json file: var obj={a:1,b:2,'c':[1 ,2],'d':{c:[2,34,4]}} JSON.stringify(obj)==>"{"a":1,"b":2,"c":[ 1,2],"d":{"c":[2,34,4]}}"
json has strict requirements on the format. You cannot add = directly to the json file. You must follow the format of "key":.... You can assign the obtained json object to a variable in js
The json format is wrong. You can copy this object to a js file and use JSON.stringify to convert it and then copy it to the json file:
var obj={a:1,b:2,'c':[1 ,2],'d':{c:[2,34,4]}}
JSON.stringify(obj)==>"{"a":1,"b":2,"c":[ 1,2],"d":{"c":[2,34,4]}}"