I have the following yaml structure:
TestPaySignService:
Test:
TestString:
settings-key: TestStringValue
types:
- type1
- type2
TestString2:
settings-key: TestStringValue2
types:
- type1
- type2
I want to parse this yaml and store only "settings-key" and "types" together in c# collection, for example List, like the following:
[
{
name: TestStringValue,
types: ["type1", "type2"]
},
{
name: TestStringValue2,
types: ["type1", "type2"]
}
]
I've followed the follwin question and tried the accepted answer's code, but as it seems it's obsolete for now: Deserialize a YAML "Table" of data
P.S. my yaml schema changes every time, but "settings-key" and "types" are always contained, so I want to create something like "dynamic parser"