反序列化JSON我有這樣的JSON:用多變的關鍵
{
"data":
{
"110714":{"periphery_id":108},
"110715":{"periphery_id":102},
"110710":{"periphery_id":107}
}
}
,並描述它的類:
public class Info
{
[JsonProperty("periphery_id")]
public int PeripheryId { get; set; }
}
public class Data
{
[JsonProperty(//what should be here as i have keys like 110710,110715,110714)]
public Info Info { get; set; }
}
public class Structure
{
[JsonProperty("data")]
public Data Data { get; set; }
}
我怎麼能由一類描述了這些目標?
"110714":{"periphery_id":108},
"110715":{"periphery_id":102},
"110710":{"periphery_id":107}
我知道將在JSON中的所有數字鍵的值,因爲我在服務器請求中發送它們。
API服務器是外部和`噸修改JSON結構