https://opendata.miamidade.gov/Corrections/Jail-Bookings-May-29-2015-to-current/7nhc-4yqn?
如果有人能帮我解决这个问题,我不会:我在解析/反序列化 Location 对象内部的地址信息时遇到问题。
这是我正在使用的代码片段:
var results = dataset.Query<MiamiDade_JailLog>(soql);
public class MiamiDade_JailLog
{
public string chargecode3 { get; set; }
public string charge2 { get; set; }
public string bookdate { get; set; }
public string charge3 { get; set; }
public string chargecode1 { get; set; }
public string chargecode2 { get; set; }
public string charge1 { get; set; }
public string dob { get; set; }
public Location1 location_1 { get; set; }
public string defendant { get; set; }
}
public class Location1
{
public bool needs_recoding { get; set; }
public string longitude { get; set; }
public string latitude { get; set; }
public HumanAddress human_address { get; set; }
}
public class HumanAddress
{
public string address { get; set; }
public string city { get; set; }
public string state { get; set; }
public string zip { get; set; }
}
这是错误消息:
将值转换
"{"address":"HOMELESS","city":"MIAMI","state":"FL","zip":""}"
为类型“JailLog_WFA.HumanAddress”时出错。路径“location_1.human_address”,第 1 行,位置 424。