Interesting question was, how if JSON is contested with XML. Although possible result of his(its looks like ? lm horor Freddy vs Jason, two figures horor which is each other gives battle.
If You sees final_ ? lm, it is possible that makes an issue about who did more pre-eminent.
Some comparable things between XML vs JSON, inter alia:
1. Writing Format.
XML has a real format familiar for you are which has recognized HTML. Whereas JSON, like the one your sees example of above code, also has format yangsederhana and easy to be comprehended. Then, its(the question is which easier?
Simply answers question of this simple also not easy, quite a lot telling easier JSON, as well as on the contrary.
For person writer, each there are advantage and disadvantage, writing of JSON using square bracket symbol and streamer cage, also quote, can complicate manual read, so that error types more difficult to be detected.
But, representation to a complicated data structure and is in the form of hierarchical of writing of more relative JSON structural and easy.
2. Scale.
If it is compared to in general, character scale required by smaller JSON compared to XML for the same data. This thing of course influential also at a speed of data transfer, although not signi? isn't it for small data, but enough meaned if you to apply koneksi which slow is relative to access the application of rich web ? tur exploiting data transfer.
Here JSON is more pre-eminently is compared to XML, unless data is compression beforehand before sent, difference of JSON and XML which has been compression not signi?kan
3. Browser Parsing.
Process parsing is processing recognition of token or small parts in document circuit XML/JSON.
Its(the example, you has data text in format JSON like example which we have studied, the data di-parsing must beforehand before can be accessed and dima-nipulation.
Browser parsing means process parsing happened at side client/browser.
Does browser parsing at JSON is more modestly compared to at XML, JSON to apply function JavaScript eval() to do parsing. Whereas document XML di-parsing by XMLHttpRequest. Average of survey coronates JSON as winner if it is racing its(the parsing.
4. Format Conversion.
Of course enough ironic, data format like XML and JSON is made with a purpose to that bahasa/format transfer of data applied able to apply universal, but because the many data format type choices utilized, it is possible that you must do conversion antarformat data which “ universal” the.
So, data format which really coming up with is universal understanding till now possible has not is exist, its(the profit is altogether bases on text, causing is enabled format conversion that is relative easy.
If it is compared to, easier XML format to be converted to other format, like HTML, SVG, comma-delimited, as well as JSON. One of them is is blessing of XSLT ( Extensible
Stylesheet Language Transformations), which digunakanuntuk orthogonal transformation of document XML to other document format, support from XSLT which is good at browser side and server increasingly waters down process in general.
At JSON, its(the process converts to other format has not the seleniums, because has not made available support from built-in as XSLT for XML. Although this thing is possible only time problem if JSON increasingly acceptable public. Wide acceptable and good product of course will get many supports and creates mutual profitting business opportunity.
5. Security and safety.
Like has been told, function of eval() does parsing JSON, becomes object JavaScript readily is applied. This thing generates security and safety aperture because enabling the entry of codes in the form of function undesirable executable, in consequence ascertains data JSON which you applies coming from trustworthy source.
For reason of the security and safety, process parsing JSON often is equiped with attachment security and safety, for example by adding regular expression.
Website jsonorg provides Library JavaScript which can be download in http://www.json.org/json2.js, where library recommends usage of function its(the parse in the place of function eval(). Because securit

