【发布时间】:2018-12-14 15:02:19
【问题描述】:
我有一个简单的 json:
{
"timestamp": "38519277!12/14/2018 08:35:17",
"entity": "Account",
"entity": "Contact",
"entity": "Case"
}
我需要添加到字典中:
Dictionary<string, string> objects = new Dictionary<string, string>();
键是实体,值总是相同的时间戳。我不确定如何进行。这是我以前没有做过的事情。谁能给点建议?
【问题讨论】:
-
这甚至不是一个有效的 json。你有重复的
entity键... -
应该是:
{ "timestamp": "38519277!12/14/2018 08:35:17", "entity": ["Account", "Contact", "Case"] }你现在拥有的东西是无效的,不能反序列化。