Trying to deserialize this JSON:
{
"result":"success"
"arguments": {
"activeTorrentCount":22,
"cumulative-stats": {
"downloadedBytes":1111,
}
}
}
My class:
private class DeserializationMain
{
public string result; //works
public args arguments; //works, has deserialized activeTorrentCount
public class args
{
public int activeTorrentCount;
public current cumulative_stats; //doesn't work, equals null
public class current
{
public long downloadedBytes;
}
}
}
I guess cumulative-stats doesn't get deserialized because it has cumulative_stats variable name in my class, how to deserialize that thing with a dash?