I am trying to parse a large JSON response (3 MB),...
# android
c
I am trying to parse a large JSON response (3 MB), either to
JsonElement
or to my custom structure and I am seeing an
OutOfMemoryError
every single time. Is this expected? Perhaps I am just close to the Android memory limit?
😶 1
It turns out it is a 10,000 item array – but ideally it wouldn’t trash my heap that badly
✅ 1
s
Use sequences