C#JsonConvert.DeserializeObject反序列化json字符

         dynamic dyn = Newtonsoft.Json.JsonConvert.DeserializeObject(json);
 
           foreach (var obj in dyn)
           {
               if (obj.Name == "id") 
               {
                   obj.Value = dbGuid;
                   break;
               }
           }
           string result = Newtonsoft.Json.JsonConvert.SerializeObject(dyn);

  

posted @ 2020-04-09 08:24  清语堂  阅读(9293)  评论(0编辑  收藏  举报