解决GSON序列化忽略值为null

Gson gson = new GsonBuilder().serializeNulls().create();

而后再使用gson.tojson就OK了。java

相关文章
相关标签/搜索