{ "id": "some", "title": "some", "author": { "name": "\u95eb\u9759" }, "link": [{ "@attributes": { "href": "http://localhost/", "rel": "some" } }, { "@attributes": { "href": "http://localhost/", "rel": "some" } }, { "@attributes": { "href": "http://localhost/", "rel": "some" } }] }
如上,对于服务器返回的json数据,如何获取Link中第一个@attributes的href值?
javascript - 如何获取json对象中的特定值?-PHP中文网问答-javascript - 如何获取json对象中的特定值?-PHP中文网问答
围观一下哦,学习一下。
There is the json site(http://www.json.org/), it lists the tutorial of all languages supporting json.
May be it is helpful.
for python(http://docs.python.org/library/json.h...)
for ruby(http://flori.github.com/json/)
采用递归方式来查找josn中的你需要的key.
但是还不支持 数组,你可以自己扩充,思路就是这样!