dynamic info = null ;JsonConvert.DeserializeObject(JsonConvert.SerializeObject(info));
时间: 2024-04-24 11:27:45 浏览: 194
根据引用\[1\]中的代码,`JsonConvert.DeserializeObject(JsonConvert.SerializeObject(info))`是将一个`dynamic`类型的变量`info`序列化为JSON字符串,然后再反序列化回原来的类型。在这个代码中,`info`被赋值为`null`,所以序列化后的JSON字符串也是`null`。然后,`JsonConvert.DeserializeObject`方法将这个JSON字符串反序列化为原来的类型,即`dynamic`类型的`info`变量。由于`info`本身就是`null`,所以反序列化后的结果也是`null`。
#### 引用[.reference_title]
- *1* [C#JsonConvert.DeserializeObject反序列化与JsonConvert.SerializeObject序列化(一)](https://blog.csdn.net/qq_45451847/article/details/120434797)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [C#JsonConvert.DeserializeObject反序列化与JsonConvert.SerializeObject序列化(二)](https://blog.csdn.net/qq_45451847/article/details/120955673)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [JsonConvert.DeserializeObject解析失败,映射数据为空](https://blog.csdn.net/weixin_44593486/article/details/115297216)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文