日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

json字符串的理解

發布時間:2023/11/27 生活经验 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 json字符串的理解 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.


下面是一個json

{
??? "JsonData": {
??????? "adverList": [],
??????? "carModel": {
??????????? "Account_Id": "",
??????????? "CarBrand": "",
??????????? "CarCode": 0,
??????????? "CarType": "",
??????????? "ChassisNum": "",
??????????? "DepartureTime": "",
??????????? "EngineNum": "",
??????????? "Img": null,
??????????? "IsDefaultFav": 1,
??????????? "Manufacture": 0,
??????????? "Mileage": 0,
??????????? "ModifyType": 0,
??????????? "PlateNumber": "",
??????????? "Province": ""
??????? },
??????? "recList": [
??????????? {
??????????????? "Account_Id": "405877695419",
??????????????? "Area": "",
??????????????? "BottomDes": "19",
??????????????? "ConsumerDescrip": "自動掃碼洗車-標準洗車",
??????????????? "ConsumptionType": 2,
??????????????? "CreateDate": "2017/11/29 16:44:14",
??????????????? "IntegralNumber": 10,
??????????????? "MiddleDes": "半年洗",
??????????????? "PayMathod": 3,
??????????????? "RightDes": "自動掃碼洗車",
??????????????? "ShowType": 2,
??????????????? "UniqueNumber": "311520171129164414955"
??????????? },
??????????? {
??????????????? "Account_Id": "405877695419",
??????????????? "Area": "",
??????????????? "BottomDes": "20",
??????????????? "ConsumerDescrip": "自動掃碼洗車-標準洗車",
??????????????? "ConsumptionType": 2,
??????????????? "CreateDate": "2017/11/29 16:15:45",
??????????????? "IntegralNumber": 10,
??????????????? "MiddleDes": "半年洗",
??????????????? "PayMathod": 3,
??????????????? "RightDes": "自動掃碼洗車",
??????????????? "ShowType": 2,
??????????????? "UniqueNumber": "369920171129161545922"
??????????? },
??????????? {
??????????????? "Account_Id": "405877695419",
??????????????? "Area": "",
??????????????? "BottomDes": "青島盛士泰和汽車維修有限公司-五",
??????????????? "ConsumerDescrip": "青島盛士泰和汽車維修有限公司-五",
??????????????? "ConsumptionType": 1,
??????????????? "CreateDate": "2017/11/29 15:58:04",
??????????????? "IntegralNumber": 0,
??????????????? "MiddleDes": "0.01",
??????????????? "PayMathod": 2,
??????????????? "RightDes": "線下門店支付",
??????????????? "ShowType": 2,
??????????????? "UniqueNumber": "201711291556036091PAi3T"
??????????? },
??????????? {
??????????????? "Account_Id": "405877695419",
??????????????? "Area": "",
??????????????? "BottomDes": "0.01",
??????????????? "ConsumerDescrip": "購半年洗消費",
??????????????? "ConsumptionType": 4,
??????????????? "CreateDate": "2017/11/29 15:42:58",
??????????????? "IntegralNumber": 1100,
??????????????? "MiddleDes": "半年洗",
??????????????? "PayMathod": 2,
??????????????? "RightDes": "購買洗車卡",
??????????????? "ShowType": 2,
??????????????? "UniqueNumber": "20171129154132532SQUYO3"
??????????? },
??????????? {
??????????????? "Account_Id": "405877695419",
??????????????? "Area": "",
??????????????? "BottomDes": "0.01",
??????????????? "ConsumerDescrip": "購半年洗消費",
??????????????? "ConsumptionType": 4,
??????????????? "CreateDate": "2017/11/29 15:42:33",
??????????????? "IntegralNumber": 1100,
??????????????? "MiddleDes": "半年洗",
??????????????? "PayMathod": 1,
??????????????? "RightDes": "購買洗車卡",
??????????????? "ShowType": 2,
??????????????? "UniqueNumber": "201711291525540748LECGP"
??????????? },
??????????? {
??????????????? "Account_Id": null,
??????????????? "Area": null,
??????????????? "BottomDes": "您的駕駛證-1天到期",
??????????????? "ConsumerDescrip": null,
??????????????? "ConsumptionType": 2,
??????????????? "CreateDate": "2017/11/28 18:55:13",
??????????????? "IntegralNumber": 0,
??????????????? "MiddleDes": "駕駛證快要到期了",
??????????????? "PayMathod": 0,
??????????????? "RightDes": "駕駛證",
??????????????? "ShowType": 4,
??????????????? "UniqueNumber": "fb81447c-2ad4-e711-95c4-58fb84d873e4"
??????????? },
??????????? {
??????????????? "Account_Id": null,
??????????????? "Area": null,
??????????????? "BottomDes": "您的愛車車險-305天到期",
??????????????? "ConsumerDescrip": null,
??????????????? "ConsumptionType": 4,
??????????????? "CreateDate": "2017/11/28 18:55:13",
??????????????? "IntegralNumber": 0,
??????????????? "MiddleDes": "愛車車險證快要到期了",
??????????????? "PayMathod": 0,
??????????????? "RightDes": "車險到期",
??????????????? "ShowType": 4,
??????????????? "UniqueNumber": "42077e97-2ad4-e711-95c4-58fb84d873e4"
??????????? }
??????? ]
??? },
??? "ResultCode": "F000000",
??? "ResultMessage": "成功"
}


里面有2個數組和1個json 在這個在寫bean的時候大致寫法如下

public static class JsonDataBean {private List<AdverListBean> adverList;
    private List<RecListBean> recList;

    private CarmodelBean carModel;
}

獲取get和set方法后

在聲明三個方法

public static class RecListBean implements Serializable {
}

public static class AdverListBean implements Serializable {
}

public static class CarmodelBean implements Serializable{
}

里面在寫一個具體的內容即可,注意方法名用json前面的方法,

這樣就是其大致寫法,

as 用快捷鍵 ait+s? 先解析再生成也行








總結

以上是生活随笔為你收集整理的json字符串的理解的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。