请选择 进入手机版 | 继续访问电脑版

马上加入IBC程序猿 各种源码随意下,各种教程随便看! 注册 每日签到 加入编程讨论群

C#教程 ASP.NET教程 C#视频教程程序源码享受不尽 C#问题入口 ASP.NET问题入口

【C#问题提交】 社群合作 申请版主 程序开发 【远程协助】 每天乐一乐 每日签到 【承接毕业设计】 面试-葵花宝典下载

官方一群:

官方二群:

查看: 625|回复: 8

[求助] json转c#实体类,求大佬

  [复制链接]

该用户从未签到

7

主题

12

帖子

69

积分

注册会员

Rank: 2

积分
69
发表于 2020-5-30 17:18:40 | 显示全部楼层 |阅读模式

马上加入IBC,查看更多教程

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
{"result":{"realtime":{"wind":{"windspeed":"","direct":"西风","power":"2级","offset":""},"time":"16:00:00","weather":{"humidity":"59","img":"00","info":"晴","temperature":"28"},"dataUptime":"1590827952","date":"2020-05-30","city_code":"101200101","city_name":"武汉","week":"6","moon":"四月初八"},"life":{"date":"2020-05-30","info":{"kongtiao":["较少开启","您将感到很舒适,一般不需要开启空调。"],"yundong":["适宜","天气较好,赶快投身大自然参与户外运动,尽情感受运动的快乐吧。"],"ziwaixian":["弱","紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。"],"ganmao":["少发","各项气象条件适宜,无明显降温过程,发生感冒机率较低。"],"xiche":["较适宜","较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"],"wuran":null,"chuanyi":["热","天气热,建议着短裙、短裤、短薄外套、T恤等夏季服装。"]}},"weather":[{"date":"2020-05-30","week":"六","nongli":"闰四月初八","info":{"dawn":["1","多云","18","东风","微风","19:19"],"day":["1","多云","28","西南风","微风","05:22"],"night":["1","多云","20","南风","微风","19:19"]}},{"date":"2020-05-31","week":"日","nongli":"闰四月初九","info":{"dawn":["1","多云","20","南风","微风","19:19"],"day":["0","晴","30","东南风","微风","05:21"],"night":["0","晴","22","东风","微风","19:20"]}},{"date":"2020-06-01","week":"一","nongli":"闰四月初十 ","info":{"dawn":["0","晴","22","东风","微风","19:20"],"day":["1","多云","32","东南风","3-5级","05:21"],"night":["1","多云","22","东南风","3-5级","19:20"]}},{"date":"2020-06-02","week":"二","nongli":"闰四月十一","info":{"dawn":["1","多云","22","东南风","3-5级","19:20"],"day":["7","小雨","29","南风","3-5级","05:21"],"night":["7","小雨","23","南风","微风","19:21"]}},{"date":"2020-06-03","week":"三","nongli":"闰四月十二","info":{"dawn":["7","小雨","23","南风","微风","19:21"],"day":["7","小雨","28","南风","微风","05:21"],"night":["1","多云","21","东风","微风","19:21"]}}],"pm25":{"key":"武汉","show_desc":null,"pm25":{"curPm":"38","pm25":"22","pm10":"36","level":"1","quality":"优","des":"空气很棒,快出门呼吸新鲜空气吧。"},"dateTime":"2020年05月30日15时","cityName":"武汉"},"isForeign":0},"error_code":0,"reason":"Succes"}
  • TA的每日心情
    开心
    8 分钟前
  • 签到天数: 1654 天

    [LV.Master]伴坛终老

    4251

    主题

    6180

    帖子

    11万

    积分

    管理员

    IBC编程社区-原道楠

    Rank: 9Rank: 9Rank: 9

    积分
    113774

    推广达人突出贡献优秀版主荣誉管理论坛元老

    发表于 2020-6-1 09:15:55 | 显示全部楼层
    你就跟着这个格式分级建实体


    [XML] 纯文本查看 复制代码
    {
    	"result": {
    		"realtime": {
    			"wind": {
    				"windspeed": "",
    				"direct": "西风",
    				"power": "2级",
    				"offset": ""
    			},
    			"time": "16:00:00",
    			"weather": {
    				"humidity": "59",
    				"img": "00",
    				"info": "晴",
    				"temperature": "28"
    			},
    			"dataUptime": "1590827952",
    			"date": "2020-05-30",
    			"city_code": "101200101",
    			"city_name": "武汉",
    			"week": "6",
    			"moon": "四月初八"
    		},
    		"life": {
    			"date": "2020-05-30",
    			"info": {
    				"kongtiao": ["较少开启", "您将感到很舒适,一般不需要开启空调。"],
    				"yundong": ["适宜", "天气较好,赶快投身大自然参与户外运动,尽情感受运动的快乐吧。"],
    				"ziwaixian": ["弱", "紫外线强度较弱,建议出门前涂擦SPF在12-15之间、PA+的防晒护肤品。"],
    				"ganmao": ["少发", "各项气象条件适宜,无明显降温过程,发生感冒机率较低。"],
    				"xiche": ["较适宜", "较适宜洗车,未来一天无雨,风力较小,擦洗一新的汽车至少能保持一天。"],
    				"wuran": null,
    				"chuanyi": ["热", "天气热,建议着短裙、短裤、短薄外套、T恤等夏季服装。"]
    			}
    		},
    		"weather": [{
    			"date": "2020-05-30",
    			"week": "六",
    			"nongli": "闰四月初八",
    			"info": {
    				"dawn": ["1", "多云", "18", "东风", "微风", "19:19"],
    				"day": ["1", "多云", "28", "西南风", "微风", "05:22"],
    				"night": ["1", "多云", "20", "南风", "微风", "19:19"]
    			}
    		}, {
    			"date": "2020-05-31",
    			"week": "日",
    			"nongli": "闰四月初九",
    			"info": {
    				"dawn": ["1", "多云", "20", "南风", "微风", "19:19"],
    				"day": ["0", "晴", "30", "东南风", "微风", "05:21"],
    				"night": ["0", "晴", "22", "东风", "微风", "19:20"]
    			}
    		}, {
    			"date": "2020-06-01",
    			"week": "一",
    			"nongli": "闰四月初十 ",
    			"info": {
    				"dawn": ["0", "晴", "22", "东风", "微风", "19:20"],
    				"day": ["1", "多云", "32", "东南风", "3-5级", "05:21"],
    				"night": ["1", "多云", "22", "东南风", "3-5级", "19:20"]
    			}
    		}, {
    			"date": "2020-06-02",
    			"week": "二",
    			"nongli": "闰四月十一",
    			"info": {
    				"dawn": ["1", "多云", "22", "东南风", "3-5级", "19:20"],
    				"day": ["7", "小雨", "29", "南风", "3-5级", "05:21"],
    				"night": ["7", "小雨", "23", "南风", "微风", "19:21"]
    			}
    		}, {
    			"date": "2020-06-03",
    			"week": "三",
    			"nongli": "闰四月十二",
    			"info": {
    				"dawn": ["7", "小雨", "23", "南风", "微风", "19:21"],
    				"day": ["7", "小雨", "28", "南风", "微风", "05:21"],
    				"night": ["1", "多云", "21", "东风", "微风", "19:21"]
    			}
    		}],
    		"pm25": {
    			"key": "武汉",
    			"show_desc": null,
    			"pm25": {
    				"curPm": "38",
    				"pm25": "22",
    				"pm10": "36",
    				"level": "1",
    				"quality": "优",
    				"des": "空气很棒,快出门呼吸新鲜空气吧。"
    			},
    			"dateTime": "2020年05月30日15时",
    			"cityName": "武汉"
    		},
    		"isForeign": 0
    	},
    	"error_code": 0,
    	"reason": "Succes"
    }
    C#论坛 www.ibcibc.com IBC编程社区
    C#
    C#论坛
    IBC编程社区

    该用户从未签到

    7

    主题

    12

    帖子

    69

    积分

    注册会员

    Rank: 2

    积分
    69
     楼主| 发表于 2020-6-1 11:08:17 | 显示全部楼层
    ibcadmin 发表于 2020-6-1 09:15
    你就跟着这个格式分级建实体

    我用工具自动创建了

    该用户从未签到

    0

    主题

    2

    帖子

    7

    积分

    新手上路

    Rank: 1

    积分
    7
    发表于 2020-6-8 14:26:29 | 显示全部楼层
    11

    该用户从未签到

    0

    主题

    3

    帖子

    13

    积分

    新手上路

    Rank: 1

    积分
    13
    发表于 2020-6-22 00:57:12 | 显示全部楼层
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则