Skip to content

Handling very large json array #403

@PSeitz

Description

@PSeitz

I have a quite large 17gb json file, which is an array of json objects [ {a:2} ... {b:2} ]
When I try to deserialize the whole object, my machine with 96GB RAM gets an OOM, which is i a little odd. Memory consumption for serde_json::from_str(&s) seems to be quite high.

I saw there is an StreamDeserializer, although it seems it handles only data in the form of {a:2} {b:2} ...
https://docs.serde.rs/serde_json/de/struct.StreamDeserializer.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions