Professional Documents
Culture Documents
Manigbas
BSIT 4-4
1. Compare JSON and XML. What are their advantages and disadvantages?
JSON is just a data format whereas XML is a markup language. You can actually place a
query and get your answer through XPath. Similarly, metadata, attributes, and namespaces can be
added in XML. Further, XML along with XSL, XSD, XQuery, etc. makes for a powerful combination.
These are some important features that still set XML a class apart. XML is the default choice for data
interchange because virtually every language has a parser for it, be it Java, .net or any others. It is
easy to fetch particular data from XML and there are schemas that can validate the XML. XML is
used extensively in today’s ‘e’ world – banking services, online retail stores, integrating industrial
systems, etc. One can put as many different types of information in the XML and it still remains
simple.
XML is platform independent and programming language independent, thus it can be used
on any system and supports the technology change when that happens. XML supports unicode.
Unicode is an international encoding standard for use with different languages and scripts, by which
each letter, digit, or symbol is assigned a unique numeric value that applies across different
platforms and programs. This feature allows XML to transmit any information written in any human
language. The data stored and transported using XML can be changed at any point of time without
affecting the data presentation. Generally other markup language such as HTML is used for data
presentation, HTML gets the data from XML and display it on the GUI (graphical user interface),
once data is updated in XML, it does reflect in HTML without making any change in HTML GUI. On
the other hand, the disadvantage of XML is its syntax is verbose and redundant compared to other
text-based data transmission formats such as JSON. The redundancy in syntax of XML causes higher
storage and transportation cost when the volume of data is large. XML document is less readable
compared to other text-based data transmission formats such as JSON. XML doesn’t support array.
XML file sizes are usually very large due to its verbose nature it is totally dependent on who is
writing it.
JSON is light weight component. It doesn’t take more time for execution. It supports data
structures used in modern languages. In Java script we cannot retrieve values from other files for
example java. In JSON we can retrieve values from anywhere. It supports all languages. Although, It
is very difficult to understand by a human. Because of so many braces and commas used in that.
JSON is not suitable for large data’s. JSON does not have a < [CDATA []]> feature, so it is not suitable
for handling multimedia formats.
Take Home Activity for Node.js