JSON and E4X, a path

Manipulating XML with Javascript, when you are using Ajax techniques, is a pain. This is why JSON was created and at first I was pleased with it. It seemed a neat way of passing data back and forth without the hassle of traversing XML nodes.

However it struck me that JSON might be a dead end what with the impending arrival of E4X aka ECMAScript for XML. As the name suggest it makes XML manipulation with Javascript a good deal easier. I haven’t worked with it much but as far as I can see it makes XML data a native object in Javascript.

So you can invest in JSON now and then later on switch all your Ajax endpoints to XML and all your client-side script. Or you can battle with XML for now and hope E4X becomes standard in as many browsers as possible.

Viewing 2 Comments

 

Trackbacks

(Trackback URL)

close Reblog this comment
blog comments powered by Disqus