I want to deserialize a Json to the following class
public class Config
{
public String Name { get; set; }
public SSOType Type { get; set; }
public Dictionary<String, String> Configuration { get; set; }
}
Hence, two properties would be deserialized "as usual", and the rest would be pushed into the dictionary.
JsonConvert.DeserializeObject<Config>(filetext);
This pushs datas to properties Name and Type, but the dictionary stays empty ...
I guess the json shall look like
{
"name":"something",
"type":"something",
"configuration":{
"thing1":"value",
"thing2":"value",
"thing3":"value"
}
}
but I'd like the json to be like
{
"name":"something",
"type":"something",
"thing1":"value",
"thing2":"value",
"thing3":"value"
}
How to tweak the deserialization so it works ?