JSON versus XML

Srimathi Jagadeesan
hackgenius
Published in
2 min readJul 10, 2022

--

Explore the similarities and differences between JSON & XML.

JSON Vs XML

Both JSON & XML are Data Formats used to Send and receive data from Web servers!

Both play an important role in organizing data into a readable format in many different languages and APIs.

JSON - “JavaScript Object Notation”

  1. Stores data in arrays for easier data transfers
  2. Easily parsed into a ready-to-use Javascript object, with no library needed.
  3. Easy to read and write
  4. Supported by most backend technologies and modern programming languages.
  5. Based on Javascript object literal syntax.
JSON

XML-Extensive markup language

  1. A markup language that allows the creation of custom user-defined tags.
  2. Manages data in tree structure hierarchy
  3. A complex data structure that must be parsed.
XML

SIMILARITIES & DIFFERENCES

JSON & XML are similar:

> Self-describing(human-readable)

>Parsed and used by many different programming languages.

>Hierarchial.

JSON & XML are different,

>JSON object has a type, XML is typeless

>XML has display capabilities unlike JSON

>JSON is less secure than XML

>XML is much more complex and slow to parse!

CONCLUSION

Generally, JSON is considered better than XML because it is easier to parse into a ready-to-use Javascript Object:)

Finally, I hope you found this blog insightful:)

THANK YOU!

</HAPPY LEARNING>

--

--

Srimathi Jagadeesan
hackgenius

Conversational AI || Mentored 500+ Students || Bot Builder|| Tech blogger|| Technical Trainer || Self learner.