public class BomJsonGenerator extends AbstractBomGenerator
bom, format, mapper, versionALL_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, setupObjectMappergetJsonSchema, getXmlSchema, getXmlSchemapublic com.fasterxml.jackson.databind.JsonNode toJsonNode()
public String toJsonString() throws GeneratorException
GeneratorExceptionpublic String toJsonString(boolean prettyPrint) throws GeneratorException
GeneratorExceptionpublic 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.