Here is a data contract
class A
{
public string Name{get;set;}
}
We are going to use var obj = JsonConvert.DeserializeObject<A>(jsongString)
to deserialize the json string into an object. But the json looks like:
{
"#Name#": "A"
}
Any change or inheritage are not allowed to class A in A.cs file, such as add attribute [JSONProperty(PropertyName="#Name#")]
to property. Is it possible to deserialize the string with a customed deserialize settings, what I want is
just like:
var deserializeSetting = new CustomedSettings();
var obj = JsonConvert.DeserializeObject<A>(jsonString, deserializeSetting);