0
以前,我是用XML來存儲我的應用程序用來對付播客信息。然而,使用解析器的複雜性使我從XML轉換到JSON以及其他一些原因。移動到JSON,我會轉換是正確的?
這裏是我的XML看起來像什麼:
<?xml version="1.0" encoding="utf-8"?>
<show-list count="23">
<show>
<title>TQA Weekly</title>
<description>
<![CDATA[
Technology Show, dedicated to those who wish to learn about new electronics that they have bought, or will buy soon.
We will explaining in each episode new ways of doing things like protecting your identity online, file backup and storage, encryption, using email wisely, and each show we will be giving you new tools to do so.
You may visit our web-site for show notes, lists of software, links to sites, other suggested web-sites, or to send e-mails to Steve Smith with questions, comments or concerns.
]]>
</description>
<host>Steve Smith</host>
<logo>http://images.tqaweekly.com/tqa-weekly-logo.png</logo>
<feed>http://feeds.podtrac.com/tTKj5t05olM$</feed>
</show>
<!-- more shows -->
,這裏是我的JSON的樣子:
{
"count" : 23;
[
"show" : {
"title" : "TQA Weekly",
"description" : "Technology show",
"host" : "Steve Smith",
"logo" : "http://images.tqaweekly.com/tqa-weekly-logo.png",
"feed" : "http://feeds.podtrac.com/tTKj5t05olM$"
},
"show" : {
"title" : "TWiT",
"description" : "This Week In Tech",
"host" : "Sarah Lane, etc",
"logo" : "http://logo/url",
"feed" : "http://feed/url"
}
// more shows
]
}
我的問題是:我已做得正確,從XML轉換爲JSON ?目的是表示JSON相同的信息。
我相信,我和別人一起做語法錯誤。請把它們指出來。我在JSON