Skip to content

Commit

Permalink
[Feature-#1925][Module core]Support null serialization of JSON data t…
Browse files Browse the repository at this point in the history
…o prevent the loss of data columns.
  • Loading branch information
gaoliang committed Oct 9, 2024
1 parent 707e461 commit 6bc1e6a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ public class GsonUtil {
public static Type gsonMapTypeToken = new TypeToken<HashMap<String, Object>>() {}.getType();

private static Gson getGson() {
GSON = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();
GSON =
new GsonBuilder()
.serializeNulls()
.disableHtmlEscaping()
.setPrettyPrinting()
.create();

return setTypeAdapter(GSON);
}
Expand Down

0 comments on commit 6bc1e6a

Please sign in to comment.