Skip to content

Is it possible to stream data through the json parser without storing everything in memory? #347

Closed

Description

@anden259

Is it possible to stream data through the json parser without storing everything in memory?

Lets say I have a json file that is 10 GB, is it possible to stream that through the parser without storing it in memory?

Something like:
file stream >> json deserialze >> data stream

and the reverse:
data stream >> json serialize >> json string stream

Is that possible with this library?

Activity

  1. nlohmann commented on Oct 31, 2016

    @nlohmann
    Owner

    What exactly would the library do in this setting?

  2. nlohmann commented on Nov 2, 2016

    @nlohmann
    Owner

    You may want to have a look at the parser callback mechanism of the library:

    It may not be 100% what you need, but maybe you can express your usecase in terms of such a callback function.

  3. nlohmann commented on Nov 11, 2016

    @nlohmann
    Owner

    @anden259 Can I close this ticket?

  4. anden259 commented on Nov 14, 2016

    @anden259
    Author

    @nlohmann I had a look through the docs, examples and source code. The current library does not support what I need, so I decided to write my own. It'll get published once it's more complete than it is at the moment. Thank you for your help. Feel free to close the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions