1
我嘗試與RouteXL建立連接,但在api響應中,我得到一個json,可能無效。奇怪的Json反序列化
從標籤路由中,他發送一個以字符串索引開始的數組。通常我將它轉換爲一個類(http://json2csharp.com),但是使用這個json,我得到了一個無效的類結構,因爲字符串索引。
之前,我去分裂它自己。你們有更好的解決方案?
與問候,
SirNirido
JSON:
{
"id": "6VTa8zH8",
"count":5,
"feasible":true,
"route": {
"0": { "name": "StartLocatie", "arrival":0, "distance":0},
"1": { "name": "58", "arrival":28, "distance":47.7},
"2": { "name": "57", "arrival":42, "distance":65.3},
"3": { "name": "56", "arrival":47, "distance":68.5},
"4": { "name": "StartLocatie", "arrival":61, "distance":87.1}}}
[LINQ與Json.net JSON(https://www.newtonsoft.com/json/help/html/LINQtoJSON.htm)? – crashmstr
這是一個有效的json – Hackerman
嘗試將'route'部分反序列化爲'Dictionary'或者'Dictionary '。我確定這是一個重複的地方... –