aaubry / YamlDotNet

YamlDotNet is a .NET library for YAML
MIT License
2.48k stars 466 forks source link

Process inline comments with DictionaryDeserializer. #864

Closed evabalint closed 7 months ago

evabalint commented 7 months ago

Dear Antoine, Edward,

We need to process some data from comments in yaml files. In these comments we usually got some descriptions about data types, ranges, available values. So I've tried to use your solution to process the yaml files, and created a CommentNodeDeserializer to process all simple values into a ValueWithComment pair and then use it in the DictionaryDeserializer. I set this behavior only if the skipComments is set to false. I hope you can accept my solution, as we really need this feature to process our input files.

Best regards, and many thanks, Eva.