static void Main(string[] args)
        {
            string json = "{\"name\": \"测试\",\"mobile\": \"15341234699\",\"city\": {\"province\": \"内蒙古自治区\",\"city\": \"呼和浩特市\",\"xian\": \"玉泉区\" },\"address\": \"255466\" }";
            JObject jo = (JObject)JsonConvert.DeserializeObject(json.ToString());
            foreach (var item in jo)
            {
                Console.WriteLine($"{item.Key}:{item.Value}");
            }
            Console.WriteLine("Hello World!");
            Console.ReadKey();
        }

  C# JObject将json字符串转为json对象

 



报红线自己记得添加相应的引用与nuget包

相关文章:

  • 2022-12-23
  • 2021-12-27
  • 2022-01-16
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案