It's simply an RSS 2.0 feed that uses JSON syntax in place of XML.
Here's an example of a RSS-in-JSON feed. It's the JSON representation of the Scripting News RSS 2.0 feed.
An attribute of an element in the XML version is a property in the RSS-in-JSON object.
If an element has one or more attributes and a value, the value is represented as a property named #value.
If an element has a value and no attributes it's represented as a property in the JSON representation.
- <enclosure> sub-element of <item> has attributes and no value. It is represented as:
"enclosure": { "url": "http://www.scripting.com/mp3s/weatherReportSuite.mp3", "length": 12216320, "type": "audio/mpeg" }
- <category> sub-element of <item> can contain both an attribute and a value.
"category": { "domain": "http://www.fool.com/cusips", "#value": "MSFT" }
- <pubDate> sub-element of <item> has a value and no attributes.
"pubDate": "Sun, 19 May 2002 15:21:36 GMT"
This document explains how an RSS 2.0 feed maps onto JSON syntax.
We'll describe the JavaScript object that the JSON is a representation of.
To create the JSON text from the RSS-in-JSON object:
jsontext = JSON.stringify (rssInJsonObject);
The RSS-in-JSON object has a single property named rss. Its value is an object whose properties correspond to the attributes and sub-elements of the RSS 2.0 <rss> element.
rss has a property named version. Since we're representing an RSS 2.0 feed its value will be "2.0".
rss must also contain a property declaring each namespace it uses. The name of each begins with xmlns followed by : followed by the name you want to use for the namespace in the feed. The value is the URL used in the namespace declaration in the XML feed.
The rss object contains a property named channel, whose value is an object that has properties corresponding to the elements of <channel> in the RSS feed.
For example, it may contain a property named cloud whose value is an object with properties corresponding to the attributes of the RSS 2.0 <cloud> element.
channel may contain an aray named item. The elements of the array correspond to <item>s in the XML version.
Written by Dave Winer, reviewed by Allen Wirfs-Brock.
A blog post with background and links, re this document.
June 2017
Dan MacTough did a schema for RSS-in-JSON.
If you have questions or comments please post an issue here.