public class BomJsonGenerator extends AbstractBomGenerator
bom, format, mapper, version
ALL_VERSIONS, NS_BOM_10, NS_BOM_11, NS_BOM_12, NS_BOM_13, NS_BOM_14, NS_BOM_15, NS_BOM_16, NS_BOM_LATEST, NS_DEPENDENCY_GRAPH_10, VERSION_LATEST
Constructor and Description |
---|
BomJsonGenerator(Bom bom,
Version version)
Constructs a new BomGenerator object.
|
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
toJsonNode()
Creates a CycloneDX BOM from a set of Components.
|
String |
toJsonString() |
String |
toJsonString(boolean prettyPrint) |
String |
toString()
Creates a text representation of a CycloneDX BoM Document.
|
getFormat, getSchemaVersion, setupObjectMapper
getJsonSchema, getXmlSchema, getXmlSchema
public com.fasterxml.jackson.databind.JsonNode toJsonNode()
public String toJsonString() throws GeneratorException
GeneratorException
public String toJsonString(boolean prettyPrint) throws GeneratorException
GeneratorException
public String toString()
toJsonString()
and will return
an empty string if toJsonString()
throws an exception. It's preferred to call toJsonString()
directly so that exceptions can be caught.Copyright © 2017–2025 OWASP Foundation. All rights reserved.