« Abstracting the CherryPy webserverDiscarded WSGI wrappers »

Content-type: text/x-json

05/18/05

Permalink 02:13:21 pm, by fumanchu Email , 45 words   English (US)
Categories: IT, Python

Content-type: text/x-json

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.

6 comments

Comment from: James Harlow [Visitor] · http://james.is.never.wrong.nu/

Isn't it rather app/x-json?

05/18/05 @ 15:45
Comment from: fumanchu [Member] Email

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. ;)

05/18/05 @ 17:06
Comment from: Simon "Gil" Meskens [Visitor] · http://www.faktor-g.com

Seeing that JSON is basically just javascript synthax, wouldn't text/javascript or application/x-javascript be okay too alternatively?

06/12/05 @ 09:55
Comment from: Lethalman [Visitor] · http://www.lethalman.net

I agree with Simon, but Opera got problems with application/x-javascript content type.

10/26/05 @ 07:18
Comment from: TeeCee [Visitor] · http://www.teecee.hu

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)

12/06/06 @ 09:15
Comment from: Felix [Visitor] · http://felixhummel.de

Thanks, TeeCee!

During development text/plain is nice for debugging purposes though...

10/29/09 @ 13:10

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.

Please enter the phrase "I am a real human." in the textbox above.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
May 2012
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Search

The requested Blog doesn't exist any more!

XML Feeds

powered by free blog software