Three Benefits of JSON

Source: Internet
Author: User
First, facilitate front-end data operations.
  1. VaRAges = {
  2. CN :{
  3. Lang:'Zh _ cn',
  4. Name:'Chinese'
  5. },
  6. En :{
  7. Lang:'US _ en',
  8. Name:'English'
  9. }
  10. };
  11. Document. Write (export Lang +'Yes'+ Name );

Second, the data volume is small, and transmission is fast.
Ex: In the previous example, the XML format is:

XML Code

  1. <?XML Version="1.0" Encoding="UTF-8"?>
  2. <Ages>
  3. <CN>
  4. <Lang>Zh_cn</Lang>
  5. <Name>Chinese</Name>
  6. </CN>
  7. <En>
  8. <Lang>Us_en</Lang>
  9. <Name>English</Name>
  10. </En>
  11. </Ages>

Obviously, JSON is smaller.

Third, the ActiveX object needs to be created when the client is manipulating XML, and JSON is completely a JS object without the need to create Dom.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.