| « Abstracting the CherryPy webserver | Discarded WSGI wrappers » |
Update: it really should be "text/x-json", not "text/json".
Funny that I haven't seen anyone recommend this before. It sure would make XMLHttpRequest parsing a snap, on both ends.
I think I'll try using that in my CherryPy JSON library.
Isn't it rather app/x-json?
Hmmm. I think it should definitely be "text". RFC 1521 says "application" should only be used if your type doesn't fit in any of the other categories, and that "text" should include data which is readable without a machine to parse it for a human. I think JSON qualifies.
Bang on about the "x-" prefix, however. Until the IANA blesses "text/json", that is. ;)
Seeing that JSON is basically just javascript synthax, wouldn't text/javascript or application/x-javascript be okay too alternatively?
I agree with Simon, but Opera got problems with application/x-javascript content type.
IANA has officially registered a MIME type for JSON: application/json.
(see: http://www.iana.org/assignments/media-types/application/)
I found this on: http://bluesmoon.livejournal.com/227190.html
BYE TeeCee :o)
Thanks, TeeCee!
During development text/plain is nice for debugging purposes though...