How can I specify folding?
Here's my json:
{
"result":
{
"code": "123",
"version": "1.2.3"
},
"error": null
}
And here's my class I want to deserialize:
public class Info
{
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("version")]
public string Version { get; set; }
[JsonProperty("error")]
public string Error { get; set; }
}
Invoking like this:
var info = JsonConvert.DeserializeObject<Info>(json);
So, is there anyway I can specify, that code
and version
under result
section? I believe I need to use JsonSerializeSettings
or something like that.