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.
RFC 4627 defines “application/json” as the correct mime-type.