SharpYaml icon indicating copy to clipboard operation
SharpYaml copied to clipboard

Parsing anchors in Model namespace

Open ianbenz opened this issue 6 years ago • 2 comments

I am having an issue loading documents that use anchors to duplicate scalar values though Model.YamlStream.Load(TextReader). A simple example of the format is:

field1: &data ABCD
field2: *data

It looks like YamlNode.ReadElement returns null when processing field2 which causes an exception in YamlMapping.Load.

ianbenz avatar Jan 16 '19 16:01 ianbenz

Could be, anchors has never been much tested nor used in SharpYaml. If you find the time, PR welcome, otherwise I don't have any spare time left for this project

xoofx avatar Jan 16 '19 16:01 xoofx

Alright, I'll see if I can track down the issue when I have a spare minute.

ianbenz avatar Jan 17 '19 13:01 ianbenz