android - Out of memory error while parsing simple JSON structure with large blob -
i have parse following json response in android bookcontent content of book converted base64 , returned string. books, getting big string response. if cast entire response jsonobject,(jsonobject obj = new jsonobject(response)) crashes, throwing out of memory exception. json structure getting simple string length of bookcontent attribute big.
{"bookresult":{"bookcontent":"3lwex0y1yakdrofr\/zd6w13fo67d\/zbow8f\/ergtdbrn\/f6v1l79krymefhpp7d3fwouyzde5ni5iu0yh6uawzqmoam3sratwi3dy9hiobhvoib8q0s+ver0kso\/eoesvyerqs+saeff9jgxjv21+q16mcesfbjpr2mpr3fmtmpge2v+aiwk5hhu10ij............","bookid":98,"name":"android principles"}}
json streamingbest option instead of bringing entire large json memory refer link
http://www.ngdata.com/parsing-a-large-json-file-efficiently-and-easily/
Comments
Post a Comment