Skip to content

Commit 54b3e3e

Browse files
committed
Allow to specify prettyPrint for toJsonString method
1 parent 2e3b7af commit 54b3e3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/cyclonedx/generators/json/BomJsonGenerator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ public String toJsonString() throws GeneratorException {
119119
return toJson(bom, true);
120120
}
121121

122+
public String toJsonString(boolean prettyPrint) throws GeneratorException {
123+
return toJson(bom, prettyPrint);
124+
}
125+
122126
/**
123127
* Creates a text representation of a CycloneDX BoM Document. This method calls {@link #toJsonString()} and will return
124128
* an empty string if {@link #toJsonString()} throws an exception. It's preferred to call {@link #toJsonString()}

0 commit comments

Comments
 (0)