JSON feed: fail

Last week someone thought that it's a good idea to invent a new standard for feeds: JSON feed.

So in addition to the four incompatible-with-each-other and underspecified RSS formats (RSS 0.90, RSS 0.91, RSS 1.0, and RSS 2.0), the correctly spec'ed Atom format and the HTML-based h-feed we have a seventh one that future feed readers will also have to support.

Validity

One of the reasons for inventing this new format is:

For most developers, JSON is far easier to read and write than XML.

One of the problems with the XML-based feed formats is that software spits out non-wellformed XML, which cannot be read with XML libraries.

The reason for this is that people think "that looks like HTML, let's write a HTML template for the XML feed" - which breaks at the first character that needs to be escaped. This could have been prevented if those people would have simply use an XML library to generate the feed XML. And yes, every programming language has an XML lib, since 15 years.

So now the JSON feed people come, see this as problem and say: Hey, JSON is so easy to generate with libraries - let's ditch XML and use JSON.

Now guess what happens? People use the HTML templating engine to generate JSON that breaks at the first character that needs to be escaped.

Dear Brent Simmons and Manton Reece: You tried to fight human nature with a new standard, and failed.

MIME type

The JSON feed spec v1 states:

JSON Feed files must be served using the same MIME type - application/json - that's used whenever JSON is served.

Congratulations, my tools now cannot differentiate between normal JSON files, JF2 feeds and JSON feeds when trying to discover feeds on a HTML page.

A proper solution would have been to use the mime/type+format schema that's already used by Atom (which has application/atom+xml): application/jsonfeed+json.

Web linking

[JSON feed] reflects the lessons learned from our years of work reading and publishing feeds.

HTTP responses, HTML pages and Atom feeds have the ability to link to other resources. This is all nicely specified in RFC 5988: Web Linking.

New technologies like the realtime change-notification system WebSub rely on the ability of feeds to link to their hub. And the JSON feed people did not even think to add support for links, because in the years of publishing feeds they never wanted to notify subscribers in realtime about updates.

Written by Christian Weiske.

Comments? Please send an e-mail.