纯手打,转载务请附上本文网址!!!
有需要的可以自己下载看看,github代码:https://github.com/xianzhixianzhixian/JsonDemo.git
实习,需要做到几个功能:
1、从内容的Json字符串中获取所有的key和value
2、把未知的Json字符传转化为LinkedList>类型的数据
首先我们面对的是一个未知的Json字符串,例如下面的这几串Json数据
使用的样例数据
{"title": "新增的任务的表单信息", "type": "object", "properties": {"finishTime": {"type": "number", "title": "任务结束时间例如:1450708950086"}, "contactEmail": {"type": "string", "title": "联系人邮箱"}, "sexType": {"type": "string", "title": "招聘性别要求,FEMALE:女,MALE:男,UNKWON:男女不限"}, "enrollEndTime": {"type": "number", "title": "报名截止时间例如:1450708950086"}, "description": {"type": "string", "title": "备注"}, "weekday": {"type": "string", "title": "工作日期"}, "title": {"type": "string", "title": "任务标题"}, "startTime": {"type": "number", "title": "任务开始时间,例如:1450708950086"}, "contactTelephone": {"type": "string", "title": "联系人电话"}, "timeDescription": {"type": "string", "title": "工作时间描述"}, "paymentType": {"type": "string", "title": "支付类型 0:线上支付,1:线下支付"}, "addressList": {"items": {"properties": {"latitude": {"type": "string", "title": "纬度"}, "cityName": {"type": "string", "title": "城市名称"}, "areaName": {"type": "string", "title": "区域名称"}, "longitude": {"type": "string", "title": "经度"}, "address": {"type": "string", "title": "t工作地点"}}, "type": "object", "