I would like to parse the following YAML
urls:
who: /fr-fr/who-we-are
test: /fr-fr/test
targetDirectory: d:\temp
Into the following structure:
public class UserConfig
{
public Dictionary<string, string> Urls { get; set; }
public string TargetDirectory { get; set; }
}
I try to serialize it with:
var deserializer = new DeserializerBuilder()
.WithNamingConvention(new CamelCaseNamingConvention())
.Build();
But I always obtains the following error: (Line: 2, Col: 1, Idx: 8) - (Line: 2, Col: 2, Idx: 9): Expected 'MappingStart', got 'SequenceStart' (at Line: 2, Col: 1, Idx: 8).
Is this library able to support a mapping of key values? If yes how can I do that?
EDIT:
This YAML give me the exact same result:
urls:
- who: /fr-fr/qui-sommes-nous?sc_site=schmidttest
- fabricantfrancais: /fr-fr/avantages-cuisinella/1er-fabricant-francais
targetDirectory: d:\temp
Regards, Benjamin V.