Using Python to develop the app backend, the difference between XML and JSON

Source: Internet
Author: User

  1. The difference between XML and JSON

    In JavaScript, JSON is a home battle, and its advantages are certainly far superior to XML.


    or ease of use, JSON is more readable than XML several Changan Street, parsing rules are much simpler. XML parsing when there are too many rules, the illegal characters, and throw the exception. This is a fatal wound to the enterprise that pursues high development speed and low development threshold.

    The drawback of JSON is that data type support is less and less accurate. Say:

  2. price:12580

    In JSON, you don't know if the price is int, float, or double.

    So, as mentioned in the second article above, in some areas where business requirements are high, XML is more appropriate.

    Finally, the performance, JSON performance is higher than XML, in addition, XML and HTTP-based webservice, JSON-based restful API, and no performance differences.

    How bad is XML performance? There is a dedicated CPU called XML Accelerator that provides hardware acceleration specifically for XML parsing.

    XML is a label format, and JSON is Key:value

    CentOS is maintained by the Redhet, so the updated package is faster, if there is a security vulnerability, there will be a corresponding patch package, while the other Ubuntu is community maintenance, not stable

    Dist-upgrade updating the operating system version



2.python Framework for background development, flask and Diango




Using Python to develop the app backend, the difference between XML and JSON

Related Article

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: info-contact@alibabacloud.com 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.