Json read error?
Hi friends I am getting the value from webservice while json value .I am storing in stringBuffer . I am getting the lot of valu开发者_运维知识库e from webservice .so I am getting out of memory error .can any body tell how to avoid that?
Thank you,
You can allocate the StringBuffer with more amount of size, or try to implement paging or lazy loading..
But, with a lot of value, I think it's not good to use JSon
Json is stored in memory and simply lot of data from server cause out of memory exception. Better idea is to download data in chunks and store in database.
To do it use Jackson library that support streaming data or JsonReader but it is only in Android 3.0.
精彩评论