We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab96aff commit afe3ccfCopy full SHA for afe3ccf
jsonvalidator-common/src/main/java/eu/europa/ec/itb/json/validation/ValidationSpecs.java
@@ -144,7 +144,10 @@ public boolean isProduceAggregateReport() {
144
private File prettyPrint(File input) {
145
try (FileReader in = new FileReader(input)) {
146
JsonElement json = com.google.gson.JsonParser.parseReader(in);
147
- Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ Gson gson = new GsonBuilder()
148
+ .setPrettyPrinting()
149
+ .serializeNulls()
150
+ .create();
151
String jsonOutput = gson.toJson(json);
152
File output = new File(input.getParent(), input.getName() + ".pretty");
153
FileUtils.writeStringToFile(output, jsonOutput, StandardCharsets.UTF_8);
0 commit comments