【发布时间】:2017-10-20 17:53:02
【问题描述】:
我有一个动态 JObject,它将字符串键映射到字符串数组。但是我在反序列化它时遇到了麻烦。我每次都会得到一个未捕获的运行时异常。
var mapStringToStrings =JsonConvert.DeserializeObject<Dictionary<string,string[]>>(payload.Map);
这是 JObject 包含的内容
{{
"c637c0bf-42ec-4f33-a679-5a220260db8e": [
"dfe7514d-1e42-4c01-ac48-4557e4e34eb3"
]
}}
这是错误:
The best overloaded method match for 'Newtonsoft.Json.JsonConvert.DeserializeObject<System.Collections.Generic.Dictionary<string,string[]>>(string)' has some invalid arguments
帮助?
【问题讨论】:
-
payload.Map到底是什么?是string吗?
标签: c# json dictionary