JavaScriptSerializer - how to deserialize a property with a dash (“-”) in it's name?
问题 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