XML and JSON selection awards

Source: Internet
Author: User

Xml&json war, generally can separate two opposing camps. The party's feel JSON is strong enough to be able to replace XML. There is a sense that JSON is funny and ugly, absolutely not and XML tournament possible.

In order to avoid "pull the hatred" (I am not MT). The author is not correct json&xml who is the more advantageous position, just analysis xml&json typical application scenario.

1. In case of human-machine interaction, we recommend using XML to provide the configuration for "machine".

"Person" here means a lack of programming experience operator or careless coder, "machine" refers to software system.

Why choose XML instead of JSON? The main reason is the XML beauty bar. There are historical reasons for the beauty of XML. In Java, for example, the classic action inside Tomcat's web.xml,struct is not configured with XML, and programming is preconceived. He appeared first, which is the standard. It's beautiful. JSON is really a bit ugly. Countless curly braces make you crack!

The second reason is that the XML constraint is more sophisticated, the advantage of the specification is to greatly reduce the cost of configuring the "Make an XML constraint", you just need to learn the DTD or schema can easily "make an XML constraint." But for most individuals or companies. Making a JSON constraint is much more expensive than writing some DTD or schema.

2, in Java. Use XML as much as possible.

Java and XML have a sense of collusion. There are too many XML-related tools such as XML parsers in Java. Really, it's too much.

3, XML can implement some simple stand-alone database.

4, network transmission, try to use JSON. Why? Thanks to the JSON lighter, the simple form. The volume is thin and light meaning to help you save a lot of other traffic, in simple means, more forms easy cross platform, expand.

5. node, to use a script or Web page JSON. This, explain to do ...

6. JSON it can be conveniently stored in multiple Key-value databases.

XML and JSON selection awards

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.