I have a problem with a very large JSON file that is too large to use ObjectMapper.readValue() into a JsonNode. I would like to use the solution from Out of memory error while parsing a large JSON using Jackson library on Android, except the JSON file is a single object with field names that are not known ahead of time, so I can't create a model POJO to deserialize to.
Each property inside the object has the same format, and I can ignore many of the properties of those inner objects (I already have a POJO class to model that). It would be easier for me to solve this problem if the JSON file was an array instead of an object. (I'm not the one creating the file, just reading from it.)
(I'm posting my solution below, but I hope there's a better one!)