The *right* JSON content type?
Posted
by
Oli
on Stack Overflow
See other posts from Stack Overflow
or by Oli
Published on 2009-01-25T15:25:19Z
Indexed on
2012/06/20
3:16 UTC
Read the original article
Hit count: 151
JSON
|content-type
Right I've been messing around with JSON for some time, just pushing it out as text and it hasn't hurt anybody (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 right? 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.)
© Stack Overflow or respective owner