WHAT IS THE *CORRECT* JSON CONTENT TYPE?

Ankita Pandey

Total Post:183

Points:1285
Posted by  Ankita Pandey
JSON 
 1009  View(s)
Ratings:
Rate this:
Hi Guys,

I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (that I know of), but I'd like to start doing things properly.

I have seen so many purported "standards" for the JSON content type:

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

But which is correct, or best? I gather that there are security and browser support issues varying between them.

I know there's a similar question, What MIME type if JSON is being returned by a REST API?, but I'd like a slightly more targeted answer.

Your help is a great appreciated. 
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: What is the *correct* JSON content type?

    Hi Ankita,


    The MIME media type for JSON text is application/json.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!