You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm downloading a yaml from a HTTP request and would like to deserialize it e.g. line by line. As soon as a specific key was sent, I'd like to trigger something, while the rest of the deserialization should continue.
What's the best approach for this?
I thought of:
Build my own TextReader to provide the samples (and block until Wait can return more bytes) to a YamlStream instance
Implement my own deserializer (similar to the new TypeDiscriminatingNodeDeserializer) which triggers an event when the necessary scalar was found.
Is there anything better which requires less development? Like having access to an emitter somewhere though the deserialization process?
Thanks in advance for any help or pointer to existing code!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I'm downloading a yaml from a HTTP request and would like to deserialize it e.g. line by line. As soon as a specific key was sent, I'd like to trigger something, while the rest of the deserialization should continue.
What's the best approach for this?
I thought of:
Wait
can return more bytes) to aYamlStream
instanceIs there anything better which requires less development? Like having access to an emitter somewhere though the deserialization process?
Thanks in advance for any help or pointer to existing code!
Beta Was this translation helpful? Give feedback.
All reactions