Ignore null fields in model serialization

in Java clients.

Closes #1413
This commit is contained in:
xhh
2015-10-21 12:05:27 +08:00
parent 7f5cdba606
commit 214e0186e8
14 changed files with 31 additions and 87 deletions

View File

@@ -23,10 +23,9 @@ public class JSON {
public JSON(ApiClient apiClient) {
this.apiClient = apiClient;
gson = new GsonBuilder()
.serializeNulls()
.registerTypeAdapter(Date.class, new DateAdapter(apiClient))
.create();
}
}
public Gson getGson() {
return gson;