This link has been bookmarked by 16 people . It was first bookmarked on 04 Dec 2007, by Pankaj.
-
22 Jun 17
-
21 Nov 09
-
11 Aug 09
-
04 May 09
-
20 Oct 08
-
04 Mar 08
-
06 Dec 07
-
E4X is an extension to JavaScript that is available to both Firefox and ActionScript developers that turns XML into a native data type on par with strings, arrays, objects, and regular expressions.
-
both E4X and JSON objects are "part" of JavaScript, though JSON is an expression of the JavaScript Object object
-
In practice, the server implementation most likely to end up using JSON is Ruby, whereas PHP, JSP, and .NET in general require that you roll your own parsers and serializers.
-
JSON is marginally more compact to encode—from perhaps two percent more efficient for attribute intensive XML to perhaps as much as eight percent more efficient for element heavy encodings. This advantage disappears if either resource is zipped, as in both cases what you're doing is storing label tokens and associated values with the syntactical variations between XML and JSON, accounting for a very small difference (likely less than 0.1 %).
-
there is some very interesting work being done right now with Efficient XML Interchange (EXI) at the level of the W3C that will likely make EXI considerably more compact than even compressed JSON.
-
JSON has an obvious advantage over DOM in that regard—DOM parsing is extraordinarily inefficient, the structures associated with DOM are large, and the time it takes to parse an object of any complexity can be an order of magnitude higher than JSON.
-
To do JSON securely, you have to use a safe implementation method, which is considerably slower than the equivalent E4X parser, while the E4X parser does not (cannot in fact) automatically expose potentially dangerous imperative code.
-
It should be noted here that, unlike the use of eval() for JSON evaluation, the new XML() constructor is code safe; it won't evaluate JavaScript functions that may be embedded within the string, even if they are bracketed.
-
-
04 Dec 07
-
30 Nov 07
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.