我正在写一个RSS feed (为了好玩),并且正在看规范here。
XML是
的一种方言。所有的RSS文件必须符合发布在万维网联盟(W3C)网站上的XML1.0规范。
显然,这意味着如果我选择JSON选项,我就不是在为“纯”RSS服务。也就是说,如果我遵循规范的其余部分,(定制的)读者是否能够解析它?
换句话说,如果我符合规范,但是使用JSON而不是XML,它是可用的RSS提要吗?
编辑我不确定我说得是否清楚。不涉及XML。我想使用JSON编写类似于RSS (即XML)的东西。显然,需要编写这样一个提要的阅读器来理解JSON格式。我想知道这是不是已经完成了。是否有以这种方式提供提要的服务?有没有可以聚合/理解这种格式的程序?在这种情况下,RSS规范(没有XML部分)是不是应该遵守的一个有用的规范?
rg
{
"title":"example.com",
"link":"http://www.example.com/",
"description":"Awesome news about junk",
"items":[
{
"title":"An article",
"link":"http://www.example.com/an-article",
"descrition":"Some sample text here",
"pubDate":"2008-10-27 11:06 EST",
"author":"example author",
},
{
"title":"Second",
"link":"http://www.example.com/Seond",
"descrition":"Some sample text here",
"pubDate":"2008-10-25 23:20 EST",
"author":"author mcauthor",
},
{
"title":"third article",
"link":"http://www.example.com/third-article",
"descrition":"Some sample text here",
"pubDate":"2008-10-25 23:18 EST",
"author":"some other author",
}
]
}
https://stackoverflow.com/questions/246577
复制相似问题