From 53071ce65d24ff135cb68f296184a62d28355f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BD=AE=E5=AD=90=E5=93=A5?= Date: Wed, 20 Mar 2024 12:20:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8D=95=E5=85=83=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B=E4=B8=AD=E7=94=A8=E4=BA=8E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=20Bean=20=E7=B1=BB=E5=AD=97=E6=AE=B5=E7=9A=84?= =?UTF-8?q?=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hjq/gson/factory/test/DataClassBean.kt | 12 ++-- .../com/hjq/gson/factory/test/JsonBean.java | 62 +++++++++---------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/app/src/androidTest/java/com/hjq/gson/factory/test/DataClassBean.kt b/app/src/androidTest/java/com/hjq/gson/factory/test/DataClassBean.kt index 28bd4a6..5e7a8e7 100644 --- a/app/src/androidTest/java/com/hjq/gson/factory/test/DataClassBean.kt +++ b/app/src/androidTest/java/com/hjq/gson/factory/test/DataClassBean.kt @@ -1,13 +1,13 @@ package com.hjq.gson.factory.test data class DataClassBean( - var name: String = "轮子哥", - var alias: String, var address: String? = "", - var company: String?, var age: Int = 20, - var weight: Int, - var stature: Int? = 180, + var alias: String, + var child: DataClassChildBean, + var company: String?, var interest: List, - var child: DataClassChildBean + var name: String = "轮子哥", + var stature: Int? = 180, + var weight: Int ) \ No newline at end of file diff --git a/app/src/androidTest/java/com/hjq/gson/factory/test/JsonBean.java b/app/src/androidTest/java/com/hjq/gson/factory/test/JsonBean.java index 909fef7..f387259 100644 --- a/app/src/androidTest/java/com/hjq/gson/factory/test/JsonBean.java +++ b/app/src/androidTest/java/com/hjq/gson/factory/test/JsonBean.java @@ -14,11 +14,12 @@ */ public final class JsonBean { - private List listTest1; - private List listTest2; - private List listTest3; - private List listTest4; - private List listTest5; + private TestBean bean1; + private TestBean bean2; + + private BigDecimal bigDecimal1; + private BigDecimal bigDecimal2; + private BigDecimal bigDecimal3; private boolean booleanTest1; private boolean booleanTest2; @@ -27,11 +28,17 @@ public final class JsonBean { private boolean booleanTest5; private boolean booleanTest6; - private String stringTest1; - private String stringTest2; - private String stringTest3; - private String stringTest4; - private String stringTest5; + private double doubleTest1; + private double doubleTest2; + private double doubleTest3; + private double doubleTest4; + private double doubleTest5; + + private float floatTest1; + private float floatTest2; + private float floatTest3; + private float floatTest4; + private float floatTest5; private int intTest1; private int intTest2; @@ -39,38 +46,31 @@ public final class JsonBean { private int intTest4; private int intTest5; + private JSONObject jsonObject; + private JSONArray jsonArray; + + private List listTest1; + private List listTest2; + private List listTest3; + private List listTest4; + private List listTest5; + private long longTest1; private long longTest2; private long longTest3; private long longTest4; private long longTest5; - private float floatTest1; - private float floatTest2; - private float floatTest3; - private float floatTest4; - private float floatTest5; - - private double doubleTest1; - private double doubleTest2; - private double doubleTest3; - private double doubleTest4; - private double doubleTest5; - - private BigDecimal bigDecimal1; - private BigDecimal bigDecimal2; - private BigDecimal bigDecimal3; - - private TestBean bean1; - private TestBean bean2; - private Map map1; private Map map2; private Map map3; private Map map4; - private JSONObject jsonObject; - private JSONArray jsonArray; + private String stringTest1; + private String stringTest2; + private String stringTest3; + private String stringTest4; + private String stringTest5; private static class TestBean {