0
我使用維基百科API查詢數據並希望將結果轉換爲字符串[]。使用Json.net轉換維基百科API響應
查詢 「測試」
en.wikipedia.org/w/api.php?action=opensearch&search=test&format=json&callback=spellcheck
返回此結果在這裏:
spellcheck(["test",["Test cricket","Test","Testicle","Testudines","Testosterone","Test pilot","Test (assessment)","Testimonial match","Testimony","Testament (band)"]])
我可以使用Json.net刪除或忽略標籤 「拼寫檢查」? 如果我使用此代碼,應用程序崩潰轉換的響應:
Dictionary<string, string[]> dict = JsonConvert.DeserializeObject<Dictionary<string, string[]>>(response);