我正在查询从http://www.imdbapi.com的数据,并且想用解析结果来解析库Json.net库。有人可以告诉我如何使用这个库来将查询响应转换为Map<string, string>
。如何使用JSON.NET将JSON反序列化为字典?
使用此代码我能够获得所有密钥,但如何查询值?
JObject obj = JObject.Parse(response);
IList<string> props = obj.Properties().Select(p => p.Name).ToList();
可怕的标题,BTW。你可不想问什么问题 - “JSON解析器”? –
对不起,我会在下次考虑。 – Pedro