您当前的位置: 首页 >  json

Peter_Gao_

暂无认证

  • 5浏览

    0关注

    621博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

json  转类

Peter_Gao_ 发布时间:2020-02-21 08:21:12 ,浏览量:5

json  转类

 

{     "animals":

    {         "dog":

        [             {"name":"Rufus",  "breed":"labrador",  "count":1,  "twoFeet":false},             {"name":"Marty",   "breed":"whippet",  "count":1,  "twoFeet":false}         ],

       "cat":{"name":"Matilda"}   } }

 

public class DogItem
{   
    public string name { get; set; }
 
    public string breed { get; set; }

    public int count { get; set; }

    public string twoFeet { get; set; }
}

public class Cat
{
    public string name { get; set; }
}

public class Animals
{
    public List  dog { get; set; }

    public Cat cat { get; set; }
}

public class Root
{
    public Animals animals { get; set; }
}

 

关注
打赏
1664521772
查看更多评论
立即登录/注册

微信扫码登录

0.5414s