format of json encoded array

2019-08-30 11:27发布

i have a json_encoded array which outputs the json like this

[Object {id="1", name="Muslin", image1="muslin.jpg"}, Object {id="72", name="damn", ...}]

Will it get parsed by jquery's parsejson If no then why not?

标签: parsing json
1条回答
成全新的幸福
2楼-- · 2019-08-30 11:39

You can validate json objects yourself using http://jsonformatter.curiousconcept.com/#jsonformatter

Json format should be as follows,

{
 "users": [
    { "id":"1" , "name":"Muslin", "image1": "muslin.jpg" },
    { "id":"72" , "name":"damn", "image1": "damn.jpg" }
        ]
}
查看更多
登录 后发表回答