返回的Json數據以下:json
[[1400025600,9633460,9667535,2698.09,2734.73,2749,2698.08,25333.3057,11784.9,13548.4,69148900],[1400112000,9667536,9700700,2734.94,2771.01,2790,2731.48,24260.1011,11824.5,12435.6,67093300],[1400198400,9700701,9736706,2771,2789,2816.33,2730,34824.2351,17912.2,16912,96751200],[1400284800,9736707,9752556,2789,2782.03,2800,2775,9279.0273,4603.73,4675.29,25840300]]
使用:dynamic jsonRespot = JsonConvert.DeserializeObject<ExpandoObject>(resposeData); 進行解析時,報以下錯誤:ui
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Dynamic.ExpandoObject' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.this
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.code
Path '', line 1, position 1.blog
解決方法,用以下語句序列化:it
JArray jsonObj = (JArray)JsonConvert.DeserializeObject(resposeData);io