什么是JSON?怎么用JSON 格式订阅这些xml 20

求高手回答:WhatisJSON?TrytouseJSONformattosubscribethefollowingXMLdata..XML:<songlist><son... 求高手回答:
What is JSON? Try to use JSON format to subscribe the following XML data..
XML:
<songlist>
<song>
<title>Reason to Cry</title>
<Album>Extreme</Album>
<Artist>Lucinda Williams</Artist>
</song>

<song>
<title>Across the Universe</title>
<Album>Let It be</Album>
<Artist>John Lennon</Artist>
<Artist>Paul McCartney</Artist>
<Artist>George Harrison</Artist>
<Artist>Ringo Starr</Artist>
</song>
</songlist>
Try to use JSON format to subscribe the following XML data 这句话怎么翻译
展开
 我来答
放逐的天歌
2007-01-28 · TA获得超过468个赞
知道小有建树答主
回答量:637
采纳率:0%
帮助的人:0
展开全部
json...因为比较短,而且处理起来比较清晰....是处理ajax等方面xml的替代....json是js..不是xml...更和xml订阅扯不上边....
用json格式描述下列xml
var songlist=[{"title":"Reason to Cry","Album":"Extreme","Artist":"Lucinda Williams"},{"title":"Across the Universe","Album":"Let It be","Artist":["John Lennon","Paul McCartney","George Harrison","Ringo Starr"]}]
应该就是这样吧
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
cootor
2007-01-28 · 超过16用户采纳过TA的回答
知道答主
回答量:51
采纳率:0%
帮助的人:54.8万
展开全部
{
"songlist":{
"song":[
{"title":"Reason to Cry","Album":"Extreme","Artist":"Lucinda Williams"},
{"title":"Across the Universe","Album":"Let It be","Artist":["John Lennon","Paul McCartney","George Harrison","Ringo Starr"]}
]
}
}

可以建个html文档测试一下

<script>
var a={"songlist":{"song":[{"title":"Reason to Cry","Album":"Extreme","Artist":"Lucinda Williams"},{"title":"Across the Universe","Album":"Let It be","Artist":["John Lennon","Paul McCartney","George Harrison","Ringo Starr"]}]}};
alert(a["songlist"]["song"][1]["Artist"][0]);
</script>
本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式