which is better in terms of parsing performance in Android, XML or JSON?
android, json, xml-parsing
Solution
JSON is best compare to XML
XML is not well suited to data-interchange
Simplicity
XML is simpler than SGML, but JSON is much simpler than XML. JSON has a much smaller grammar and maps more directly onto the data structures used in modern programming languages.
Extensibility
JSON is not extensible because it does not need to be. JSON is not a document markup language, so it is not necessary to define new tags or attributes to represent data in it.
Interoperability
JSON has the same interoperability potential as XML.
Openness
JSON is at least as open as XML, perhaps more so because it is not in the center of corporate/political standardization struggles.
Weight: Since JSON syntax requires fewer characters, it is lighter on the wire than XML.
But still it depends on the requirements!
Problem
I am new to android development What should I use for my Android application, XML or JSON? Which is better in terms of parsing performance? I would appreciate any sample code.