Last Comment Bug 360666 - Support for JSONRequest
: Support for JSONRequest
Status: NEW
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- enhancement with 6 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Andrew Overholt [:overholt]
Mentors:
http://www.json.org/JSONRequest.html
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-14 07:15 PST by Gopal Venkatesan
Modified: 2011-11-24 15:13 PST (History)
31 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Gopal Venkatesan 2006-11-14 07:15:49 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)

The specification is available from:

  http://www.json.org/JSONRequest.html

Would it be possible for this to make it sometime for JS2?


Reproducible: Always
Comment 1 Brendan Eich [:brendan] 2006-11-14 10:40:04 PST
Wrong component.  JavaScript Engine is the core language, not various APIs that are properly (or not) part of the DOM or browser object model.

Is this a dup?

/be
Comment 2 Carsten Book [:Tomcat] 2006-11-28 12:10:06 PST
dupe of 340987

*** This bug has been marked as a duplicate of 340987 ***
Comment 3 :Gavin Sharp [email: gavin@gavinsharp.com] 2006-11-28 12:28:45 PST
No, it isn't. JSONRequest and parseJSON/toJSONString aren't the same thing.
Comment 4 Biju 2006-11-29 15:07:57 PST
why can we have just one "Request" and use it for getting XML, JSON, image, or text, instead of separate JSONRequest, XMLHttpRequest, new Image() etc. depending on security.
Comment 5 Garrett Smith 2007-08-23 16:07:03 PDT
(In reply to comment #4)
> why can we have just one "Request" 

"CrossSiteRequest" seems more to the point of addressing security. 

> and use it for getting XML, JSON, image, or
> text, instead of separate JSONRequest, XMLHttpRequest, new Image() etc.
> depending on security.
> 

That was my initial reaction, 30 seconds into reading the JSONRequest spec. Why is JSON is the only valid transfer encoding/type. 

The name 'JSONRequest' seems only more suitable to the interface described in the JSONRequest whitepaper than 'XMLHttpRequest' is to the XMLHttpRequest interface due to JSONRequest's encoding limitations (JSON), which do not appear to be justified. 

The JSONRequest specification appears to be biased towards JSON.

This was argued well by Jim Ley on WHAT WG:
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2006-March/006083.html

Should Security and Encoding be decoupled? 
Comment 6 Douglas Crockford 2007-08-23 17:52:02 PDT
Some security is obtained because the encoding is limited to a single format. 
Comment 7 Douglas Crockford 2007-09-01 23:43:36 PDT
A JSONRequest Firefox extension by Collin Jackson can be found at http://crypto.stanford.edu/jsonrequest/
Comment 8 Garrett Smith 2007-11-26 14:05:29 PST
Doug, your input on the the W3C CrossSiteRequest could be helpful:

http://www.w3.org/TR/access-control/

Comment 9 Brendan Eich [:brendan] 2008-02-28 20:44:48 PST
The addon mentioned in comment 7 is at AMO now:

https://addons.mozilla.org/en-US/firefox/addon/5615

/be
Comment 10 Uriel 2008-06-22 19:46:38 PDT
What are the chances of this going in for 3.1?

Could the addon be included as is or does it require further work (if so, what?)? Or will we need a different implementation?

CrossSiteRequest is much more complex and still in working draft status. JSONRequest fits more cleanly and simply with the way we are building AJAX sites, so it would really be nice to have it available as early as possible.
Comment 11 Collin Jackson 2008-06-24 15:38:22 PDT
The addon is currently implemented in JavaScript. I think we'd probably want a C++ implementation if native support is desired.
Comment 12 John Resig 2008-07-03 12:10:19 PDT
(In reply to comment #10)
> CrossSiteRequest is much more complex and still in working draft status.
> JSONRequest fits more cleanly and simply with the way we are building AJAX
> sites, so it would really be nice to have it available as early as possible.

An implementation of Cross-Site XMLHttpRequest is already complete and is queued to go in Gecko 1.9.1. See bug 389508 and bug 408098.

Comment 13 :Ms2ger (⌚ UTC+1/+2) 2011-11-24 15:13:11 PST
Wontfix?

Note You need to log in before you can comment on or make changes to this bug.