I have a JSON with multidimensional array. I have no idea how to deserialize it on my c# model. I did a very simple way of deserialization which is not working. I need to know how to deserialize my JSON on more structural way.
This is my json data
{
"Access_point_result": [
{
"msg": {
"ap_eth_mac": {
"addr": "D8C7C8C0C7BE"
},
"ap_name": "1344-1-AL5",
"ap_group": "1344-hq",
"ap_model": "135",
"depl_mode": "DEPLOYMENT_MODE_CAMPUS",
"ap_ip_address": {
"af": "ADDR_FAMILY_INET",
"addr": "10.6.66.67",
"reboots": 1,
"rebootstraps": 2,
"managed_by": {
"af": "ADDR_FAMILY_INET",
"addr": "0.0.0.0"
},
"managed_by_key": "2e302bee0164cc154d1d266d8567ada44d49e77af82f4b5ccb",
"radios": {
"radio_bssid.addr": "D8.C7.C8.46.D8.10"
},
"is_master": true,
"ap_location": {
"ap_eth_mac": "D8C7C8C0C7BE",
"campus_id": "6F9DEC79839D458B9F148D16A46A353E",
"building_id": "83393A922FB249C1929B95393A2AAFDA",
"floor_id": "260BE76B0DD13E7AAF18EB3B47DD7F7B",
"longitude": -122.008,
"latitude": 37.4129,
"ap_x": 22.15,
"ap_y": 99.18
}
},
"ts": 1382046667
}
}
]
}
Below is my C# model
public class WifiDataAruba : BaseModel
{
public string APMACAddr { get; set; }
public string APName { get; set; }
public string APGroup { get; set; }
public string APModel { get; set; }
public string APDeplMode { get; set; }
public string APIPAddr { get; set; }
public int APReboots { get; set; }
public int APRebootStraps { get; set; }
public string APManagedBy { get; set; }
public string APManagedByKey { get; set; }
public string APRadios { get; set; }
public bool APMaster { get; set; }
public string APLocation { get; set; }
public string APMACAddr2 { get; set; }
public string APCampusID { get; set; }
public string APLocationID { get; set; }
public string APBuildingID { get; set; }
public string APFloorID { get; set; }
public double APLongtitude { get; set; }
public double APLatitude { get; set; }
public double X { get; set; }
public double Y { get; set; }
public DateTime ImportTimestamp { get; set; }
}
How can i make the break the deserialization much structural way?