• dotdev
  • Posts
  • JSON Feed – A JSON based Spec for RSS or Atom Feeds

JSON Feed – A JSON based Spec for RSS or Atom Feeds

JSON Feed is a new project aiming to put together a formal spec for JSON based RSS feeds.

“For most developers, JSON is far easier to read and write than XML. Developers may groan at picking up an XML parser, but decoding JSON is often just a single line of code”, Brent Simmons said in the announcement, “Our hope is that, because of the lightness of JSON and simplicity of the JSON Feed format, developers will be more attracted to developing for the open web.”

Here is an example from a very basic feed:

{
    "version": "https://jsonfeed.org/version/1",
    "title": "My Example Feed",
    "home_page_url": "https://example.org/",
    "feed_url": "https://example.org/feed.json",
    "items": [
        {
            "id": "2",
            "content_text": "This is a second item.",
            "url": "https://example.org/second-item"
        },
        {
            "id": "1",
            "content_html": "<p>Hello, world!</p>",
            "url": "https://example.org/initial-post"
        }
    ]
}

They also aim to support a few other common use cases including:

  • Microblogs, which are often plain text and without titles.

  • Multiple attachments.

  • Modern needs such as avatar images, feed icons and favicons, and banner and featured images.

Having built a few XML based sitemaps in my lifetime I’m all for this new project and I hope it gains traction. Dealing with XML is horrific and the the web has pretty much choosen JSON as the clear winner.

For more information on this new JSON Feed, see the official site, version 1 of the spec, and the Github project.

Reply

or to participate.