我在閱讀C#中的以下JSON輸出時遇到問題。我不是太熟悉JSON語法,但它似乎並沒有被正確格式化,或我不清楚如何正確地反序列化數據:C#問題的JSON反序列化問題
陣列( [標籤] =>列名 [專欄] => column0)
陣列( [0] => 0 [1] =>數組 ( )
[2] => 0) {"total":0,"entities":[],"page":0}
在C#中使用的代碼只是:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = WebRequestMethods.Http.Get;
request.Accept = "application/json";
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
Encoding enc = Encoding.GetEncoding(1252);
StreamReader configStream = new StreamReader(response.GetResponseStream(), enc);
var configuration = configStream.ReadToEnd();
JavaScriptSerializer jSerialize = new JavaScriptSerializer();
List[] operations = jSerialize.Deserialize<List[]>(configuration);
我收到的錯誤是「陣列」不是一個有效的JSON原語。假設的語法是正確的來自JSON輸出,我該如何派生數據?