如何使用FastJSON将 json 转换为字典。string(key) 是土壤的名称。
非常感谢!
"Soil": [
{
"name": "Pebbiland",
"retentionrate": 1,
"cost": 100
},
{
"name": "Sandiland",
"retentionrate": 4,
"cost": 500
},
{
"name": "Spongiland",
"retentionrate": 8,
"cost": 1000
}
public class SoilStat
{
public int retentionRate;
public int cost;
}
Dictionary<string, SoilStat> _soilList = new Dictionary<string, SoilStat>();