I have a yaml where both of the following formats are acceptable -
args:
buildno: 1
gitcommithash: cdc3b19
And
args:
- buildno=1
- gitcommithash=cdc3b19
With current YamlDotnet
configuration,
[YamlMember(Alias = "args")]
public Dictionary<string, string> Args { get; set; }
I can parse when the yaml is of format no. 1.
How can I modify my YamlDotNet
code to accept both formats?
i.e. Accepting list as well as Dictionary for Args?