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 *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.