using Newtonsoft.Json;//引用命名空间
Dictionary<string, string> Content = new Dictionary<string, string>();
Content.Add("bulletinContent", "this is bulletinContent");
 Content.Add("topToDay", "this is topToDay");

//Dictionary转json
 string Contentjson = JsonConvert.SerializeObject(Content);
//json转Dictionary
Dictionary<string, string> DicContent = (Dictionary<string, string>)JsonConvert.DeserializeObject(Contentjson.ToString());

 

相关文章:

  • 2021-06-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2021-11-14
  • 2022-12-23
  • 2021-09-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案