-
Notifications
You must be signed in to change notification settings - Fork 4
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
Reader algorithms on chunk_reader #52
Comments
So, my idea to use algorithms in the likes of the ones we've developed for the |
Getting That only partially solves the problem though, because we need to distinguish between a error and end-of-input in order to indicate that the A possible workaround could be to return a tri-bool instead of a bool, which indicates
|
That kinda was my point about coroutines. Once My idea was to keep the state in a new Honestly it's pretty easy to reimplement
That's the first time tribool ever solved a problem for me. It works for me. The current lack of error vs end of input is also the only blocker for tabjson's chunked parsing as I can workaround everything else already. |
I have added a feature branch with the tribool changes. |
So, I'm trying to update tabjson to support the concatenated JSON streaming model. Therefore the first change I had to do was replacing
reader
bychunk_reader
. However as soon as I made the change the project failed to compile due to algorithms such asjson::partial::skip()
no longer working.These algorithms hardcode the type
json::reader
. However I don't think the current decision is wrong. It's pretty much unclear how to recover once a composite operation fails midway. Failing to acceptchunk_reader
args is a good thing here. If we were to change the algorithms I envision two approaches:Both approaches are undesirable in my eyes.
However the question remains: how would one approach the usage of algorithms such as
partial::skip()
in a chunked stream? I have a few ideas and I thought I'd open up an issue to discuss them. I'll comment more later (a few of the ideas will also be discussed in separate issues).The text was updated successfully, but these errors were encountered: