Ten years ago, XML was the primary data interchange format. When it came on the scene, it was a breath of fresh air and a vast improvement over the truly appalling SGML (Standard Generalized Markup Language).
But it’s no secret that in the last few years, a bold transformation has been afoot in the world of data interchange. The more lightweight, bandwidth-non-intensive JSON (JavaScript Object Notation) has emerged not just as an alternative to XML, but rather as a potential full-blown successor.The rise of JSON as a key player in database technologies is another bad portent for XML. As it stands, Big Data does not have a preferred data interchange format per se. But the claim that I’d like to make about Big Data and JSON is a bit more specific. What I’d like to argue is that JSON is emerging as a preferred format in web-centric, so-called “NoSQL” databases.
I am putting one JSON example here. you may try to write corresponding XML file and a java Parser for your learning.
{ "Users": { "type": "bank", "User": [ { "name": "Ram", "Bank": [ { "name": "SBI", "UserID": "RamSBI", "Password": "RamSBIpwd" } ] }, { "name": "Mohan", "Bank": [ { "name": "SBI", "UserID": "MohanSBI", "Password": "MohanSBIpwd" } ] } ] } }