What is the correct JSON content type?

html5

#1

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.


#2

json type really depend of the content you expect to receive back in the json response.


#3

I always use this one, I had no problems.