json转成Dictionary

如下一串字符串,根据 logID、sign、IP、时间、方法、类型、消息作为key,转成 Dictionary<string, object>

{

"logID":"7",

"sign":"9914df154c1b0f2843849c6b07eead8c",

"IP":"127.0.0.1",

"时间":"2018/1/12 11:06:43",

"方法":"SapDataService.CommonService.GetBusinessData",

"类型":"响应",

"消息":"{"d":{"results":[{"__metadata": {"type":"jkh","uri":"666)"},"DocEntry":2859,"DocNum":1819,"CardCode":"V010394","CardName":"XXXX有限公司","NumAtCard":"46","Comments":"666","PurchaseDelivery1":{"__deferred":{"uri":"fdgdf"}}}]}}"

}


侃侃尔雅
浏览 1062回答 1
1回答

aluckdog

这个地方会把字符串中断掉.后面的双引号就已经是字符串结束了.所以是错误的.这个字符串应该是被拼接出来的.生成这个json字符串的时候.用json序列化一下.
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java