0

I have a very large json file within my android app with the following struture:

[
  {
    "id": 123,
    "data": {
      ...
    }
  },
  {
    "id": 456,
    "data": {
      ...
    }
  },
  ...
]

Depending on the item selected in the UI, I need to deserialize only the item with the corresponding id, but right now I'm deserializing the whole file and then do the filter, which takes time and memory to just extract the id I need.

Is there a way to deserialize only the section I need?

I'm using kotlinx.serialization.

user17952421
  • 103
  • 3

0 Answers0