konklone / jss

JSON Simple Syndication -- RSS rethought for JSON
https://github.com/konklone/jss/issues/10
6 stars 0 forks source link

Container for items #8

Open audiodude opened 10 years ago

audiodude commented 10 years ago

Although it seems assumed in the README that it is probably just an array, I wonder what the container format for items looks like. Maybe taking into account #4 as well, it would be best to define a container that holds metadata about the items in the feed.

This also more closely maps to the RSS concept of a "channel", so it would be easier for those wishing to convert RSS feeds to RSS-JSON to bring those fields over.

You also might consider that as this spec evolves, you want some kind of versioning of RSS-JSON documents so that when I encounter one in the wild, I can know without introspection what features it has and conforms to.

I also like the idea of using _underscored-fields for meta fields that are not part of the data proper but might be added by a processor

Note that in the example below, the _url is redundant because of the presence of link.

{
  "_rss-json": "RSS-JSON 0.1 <https://github.com/konklone/rss-json>",
  "_content-type": "text/html",
  "_url": "http://somecompany.com/feed.rssjson",
  "title": "Some Company's RSS-JSON Feed",
  "link": "http://somecompany.com/feed.rssjson",
  "description": "Our data, in RSS-JSON format. 24 hours a day.",
  "language": "en-us",
  "copyright": "2014 Some Company. All Rights Reserved",
  items: [
    {  ...   },
    {  ...   },
  ]
}