I have used both ArrayList<> and JsonArray as the data sets in the adapter. One of the major difference I found was that the data set changes for the local data in Adapter was not reflected back in the calling class for JsonArray.
I wanted to know using which one is better and is my observation correct.
Also if my data set involves extracting data from a webservice(that gives me Json form data) will my changing it to ArrayList<> be better.
JsonArray implemented by ArrayList under the hood. http://grepcode.com/file/repo1.maven.org/maven2/org.json/json/20080701/org/json/JSONArray.java
So its very similar variants for app performance. Use what you like =)
As far as I know JsonArray isn't much slower than ArrayList. So I believe that you should be ok using JsonArray. We would need to see some code to help out with the problem when using jsons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With