I need to import data from a file to my application. The obvious choices are XML and JSON. I have heard that JSON is lightweight and when parsed with Jackson, it gives good performance. But I have also heard that JiBX for XML is fast and uses XMLpull to give good performance. I would like to know which option to go for and why?. Can I get a speed comparison of XML with JiBX and JSON with Jackson? Also, I want to know if Google Gson is better than Jackson for JSON parsing.
Json is the light weight.If you want to use large documents use, JSon with Jackson.
Excellent explanation been given in this article(especially read Note:). Xml you have
different types like DOM,PULL and SAX.But as per my knowledge, JSON is the best. For Large
documents,prefer Jackson. http://www.javabeat.net/2011/05/androids-json-parser/
For Jackson and gson. Have a glance of this link.
So when comparing with xml and json,i always suggest you to use json, since it's a light weight data for android. So it will be fast in loading and display the data. And gson,
it depends based on your project. Please see the above link comparsion.you will cleanly understand.