当前位置:编程学习 > C#/ASP.NET >>

求解析json数据的类文件

如何在winform中解析json格式数据,转成成list或者dataTable格式
[{
"Code":"PG",
"Name":"苹果",
"Type":[{
"TypeCode":"PG1",
"TypeName":"红富士苹果"
       },
      {
"TypeCode":"PG2",
"TypeName":"进口苹果"
       },
      {
"TypeCode":"PG3",
"TypeName":"水晶苹果"
       }]
},
{
"Code":"PT",
"Name":"葡萄",
"Type":[{
"TypeCode":"PT1",
"TypeName":"提子"
       },
      {
"TypeCode":"PT2",
"TypeName":"进口提子"
       }]
},
{
"Code":"TZ",
"Name":"桃子",
"Type":[{
"TypeCode":"TZ1",
"TypeName":"水蜜桃"
       },
      {
"TypeCode":"TZ2",
"TypeName":"普通桃子"
       },
      {
"TypeCode":"TZ3",
"TypeName":"无锡水蜜桃"
       },
      {
"TypeCode":"TZ4",
"TypeName":"猕猴桃"
       }]
}
] json winform list datatable --------------------编程问答-------------------- Newtonsoft.Json序列化和反序列
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,