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

jsontext: proof-of-concept ReadStringAsStream #167

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rogpeppe
Copy link

@rogpeppe rogpeppe commented Apr 2, 2025

This is an idea for making it possible to have explicit control over
what happens when reading strings. For example, an implementation
could choose to decode on the fly or discard large strings but still
keep going without using a large amount of memory.

Also add a PoC function, ReaderFromIter, that converts a
Seq[[]byte, error] into an io.Reader. This function probably
wouldn't end up here (may io might be a decent candidate).

Signed-off-by: Roger Peppe rogpeppe@gmail.com

@rogpeppe rogpeppe force-pushed the 001-ReadStringAsStream branch 7 times, most recently from 4099f31 to f3f6322 Compare April 3, 2025 06:50
This is an idea for making it possible to have explicit control over
what happens when reading strings. For example, an implementation
could choose to decode on the fly or discard large strings but still
keep going without using a large amount of memory.

We include a somewhat involved example demonstrating some possibilities.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
@rogpeppe rogpeppe force-pushed the 001-ReadStringAsStream branch from f3f6322 to 60d06e3 Compare April 5, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant