JSON Mime-Types

By | 11 Mar 2010

For JSON data, there are different mime-types floating around the web:

  • application/json
  • text/javascript
  • text/json
  • text/x-json

At ruby-forum.com there is a nice discussion which points out, why it is best to use text/x-json. The already wide-spread application/json is not really correct as application is meant for data which can only be read after being processed. But as JSON is clear-text, you can read it somewhat without parsing. That’s why the text branch is to be preferred. And as the json type is not yet approved, you have to use x-json – a nonstandard extension.

One thought on “JSON Mime-Types

  1. Johnathan

    RFC 4627 defines “application/json” as the correct mime-type.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)