Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support streaming large JSON arrays and objects #1091

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

luxalpa
Copy link

@luxalpa luxalpa commented Dec 18, 2023

This is a follow-up to #526 . It implements ArrayDeserializer and ObjectDeserializer APIs and allows for arbitrary nesting. The internals are a bit complex due to the way error handling works. Also, in case an actual error happens, maybe one could think about just making every successive call to the deserializer also return errors (i.e. move it into a Failed state)? I am not sure about that part of the design yet. It is also somewhat adjacent to #70

It uses lifetimes to ensure only one nested deserializer can be used at a time.

Fixes #404

@luxalpa
Copy link
Author

luxalpa commented Jan 13, 2024

I'm new to this whole Open Source thing and this is my first pull request so please let me know if there's anything I need to do (or did wrong) @dtolnay

@ivankras
Copy link

Is anyone looking into this?

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

Successfully merging this pull request may close these issues.

Provide a way for StreamDeserializer to stream an array of values
2 participants