prog: (Unabomber)
[personal profile] prog
Why would Firefox + prototype.js recognize an X-JSON of "monkey" just fine, as well as "['gibbon', 'ape', 'baboon']", but not "{'monkey_count': 42}" or even, for that matter, "{}"?

Safari is handling all of these just fine. Firefox ain't; it evaluates the latter two into "undefined". This is the latest Firefox for Mac.

Sarcastic/self-deprecatory answers from people who don't know what I am talking about not welcome. I am very grumpy right now. I am seriously about to go looking for a clock tower. For me to climb to the top of and then for me to point at people while saying pshew pshew.

Also if you comment to tell me that an ape isn't a monkey I will punch you in the head with my fists.

Update I discovered a workaround: if I wrap the curly-braced object spec in square brackets, and then pull a json = json[0]; on the receiving end, it works. I'll take it. This does not answer my question, though.

Date: 2006-04-17 04:59 pm (UTC)
From: [identity profile] misuba.livejournal.com
Wait, is X-JSON a type? Like application/X-JSON? Or are we talking something else?

Date: 2006-04-17 05:30 pm (UTC)
From: [identity profile] prog.livejournal.com
I mean its use as an HTTP header. So the line
X-json: {"monkeys_in_barrel":"42", "barrel_color": "green"}
literally appears in the received headers. No MIMEry involved.

Date: 2006-04-18 03:37 pm (UTC)
From: [identity profile] misuba.livejournal.com
Kray-zee. I've heard of sending XMLHttpRequests back as type 'text/javascript' and evaluating them, but I've never heard of this.

Might the bug be caused by some kind of HTTP-spec thing about curly brackets in header data?

August 2022

S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28 293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 15th, 2025 11:10 pm
Powered by Dreamwidth Studios