File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
core/src/main/java/cn/leancloud/gson Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,12 @@ public T read(JsonReader jsonReader) throws IOException {
109109 value = jsonReader .nextDouble ();
110110 } else if (valueType .equals (Double .class ) || valueType .equals (double .class )) {
111111 value = jsonReader .nextDouble ();
112+ } else {
113+ jsonReader .skipValue ();
114+ }
115+ if (null != value ) {
116+ targetField .set (result , value );
112117 }
113- targetField .set (result , value );
114118 } catch (Exception ex ) {
115119 ex .printStackTrace ();
116120 }
Original file line number Diff line number Diff line change 1010import java .io .IOException ;
1111
1212public class JSONObjectAdapter extends TypeAdapter <JSONObject > {
13- private MapDeserializerDoubleAsIntFix mapDeserializerDoubleAsIntFix = new MapDeserializerDoubleAsIntFix ();
1413 public void write (JsonWriter writer , JSONObject object ) throws IOException {
1514 if (!(object instanceof GsonObject )) {
1615 writer .nullValue ();
You can’t perform that action at this time.
0 commit comments