我正在使用 wikipedia 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);