-
Notifications
You must be signed in to change notification settings - Fork 253
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
Deserialize multiple objects from stream #161
Comments
There's no easy way to do this with Jil at this time. I'll think on what it'd take to support this, but I can't promise anything; Jil's hyper-focused so adding new config options isn't trivial. |
That's more I can expect. Let me know, if I can help in any way (unfortunately I'm not so used to emit). Thanks in advance |
I have taken a moment to review this issue and created a pull request (#174). The
But trying to avoid the exception in order to support streamed processing yields strange results: Variant AJust skipping
Variant BSkipping (the second)
Variant C:Patching Can anybody explain what is happening here, has an idea or at least some hint on how to debug this? Many thanks |
Hi there,
in my scenario, I want to retrieve objects from a streamed server response (over HTTP). Since this can contain many objects and take some time, I want to start deserializing and working with the objects as they arrive. This works with the
SupportMultipleContent
property of theNewtonsoft.Json.JsonTextReader
class, but deserializing seems somewhat slow - so we decided to give Jil a try.Unfortumately, I was not able to find a similar setting in Jil. Trying to just deserialize the first object by providing the stream leads to a
Jil.DeserializationException
"Expected end of stream" (as expected).I just grabed the source and tried to comment out the Check
ExpectEndOfStream
inInlineDeserializer.BuildWithNew
(just for testing) but this leaves me with anInvalidProgramException
:Is there an easy way to allow reading multiple objects?
kind rergards
Andreas
The text was updated successfully, but these errors were encountered: