Home  /  Questions  /  Question



129   96.7
Apr 20, 2013


What is the best MIME type for JSON content?

I have used both XML and JSON content types when working on webservices.

XML is fairly straightforward. We usually use


  • application/xml

JSON though seems to be supporting multiple MIME types.  I have seen these: 

  • application/json
  • text/json

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

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

By looking at XML it seems that the correct JSON counterpart is application/json.
But does anyone know what the official standard is?






 1 comment
 
I have used "application/json" in a Sencha app and it works great for IIS. IMO - others are optional formats. --- Shridutta Pachori  May 03, 2013



66   95.8
Aug 08, 2013
According to RFC 4627 is is application/json
Use that one and you'll be fine.