Closed JacekArdanowski closed 7 months ago
Nevermind, I used Accept instead of TryConsume and it now works:
// Consume the stream start event "manually"
parser.Consume<StreamStart>();
while (parser.Accept<DocumentStart>(out var @event))
{
// Deserialize the document
var doc = deserializer.Deserialize(parser);
var json = serializer.Serialize(doc);
}
Thanks for pointing that out. I’ll get the docs updated soon. And probably mark those obsolete methods as hidden so the code doesn’t break but intellisense won’t show them.
Describe the bug Hi, I'm trying to follow the tutorial here on how to deserialize multiple documents. I'm using YamlDotNet 13.7.0. I receive two warnings:
When using recommended methods, the same code snippet does not emit the second document.
To Reproduce
Sample yaml:
What am I missing here? Thanks!