When using gson to convert an entity to json, if the value of a field in the entity is NULL, there will be no corresponding field in the converted json string. Gson should not be used here. gson = new Gson();
should use Gson gson = new GsonBuilder().serializeNulls().create();
Convert gson object to json
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326681583&siteId=291194637
Ranking