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 streaming
best option instead of bringing entire large json memory refer link
http://www.ngdata.com/parsing-a-large-json-file-efficiently-and-easily/


Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

How to mention the localhost in android -

php - Calling a template part from a post -