Skip to content

Conversation

@smheidrich
Copy link
Owner

@smheidrich smheidrich commented Jan 8, 2025

daggaz/json-stream#59 ran into an issue with json-stream's feature allowing users to pass iterables of bytes to load, which makes it wrap them in a RawIOBase interface that pulls data from these iterables when read.

That exposed a more general bug in json-stream-rs-tokenizer when it comes to handling unbuffered byte streams that return UTF-8 chars split across multiple read() calls.

This PR adds a regression test for the specific case that brought this up and fixes it.

In the future, I should add lower-level tests to ensure that situations like this are handled correctly for all other kinds of streams as well, not just unbuffered bytes (#107, #108).

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.

2 participants