|
@@ -43,11 +43,6 @@ public class GsonTypeHandler extends AbstractJsonTypeHandler<Object> {
|
|
|
this.type = type;
|
|
|
}
|
|
|
|
|
|
- public static void setGson(Gson gson) {
|
|
|
- Assert.notNull(gson, "Gson should not be null");
|
|
|
- GsonTypeHandler.gson = gson;
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
protected Object parse(String json) {
|
|
|
return gson.fromJson(json, type);
|
|
@@ -57,4 +52,9 @@ public class GsonTypeHandler extends AbstractJsonTypeHandler<Object> {
|
|
|
protected String toJson(Object obj) {
|
|
|
return gson.toJson(obj);
|
|
|
}
|
|
|
+
|
|
|
+ public static void setGson(Gson gson) {
|
|
|
+ Assert.notNull(gson, "Gson should not be null");
|
|
|
+ GsonTypeHandler.gson = gson;
|
|
|
+ }
|
|
|
}
|