简体   繁体   English

如何使用带有属性 get 和 set 的 json 数据使用 C# 程序,并且我必须以表格格式显示数据?

[英]how to use C# program using json data with the properties get and set and i have to display the data in a table format?

我应该如何解析 C# 中的 json 数据?

i used JSON.NET我使用了 JSON.NET

static void Main()
{
  string json = "{\"FullName\":\"Mr Ravikanth\",\"LastName\":Yavathae}";

    JObject parsed = JObject.Parse(json);

    foreach (var pair in parsed)
    {
        Console.WriteLine("{0}: {1}", pair.Key, pair.Value);
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM