Open
Description
It would be great to provide a factory/deserializer, in order to provide a cdx.Models.Bom
from an inputstream of json.
return JSON.parse(fs.readFileSync(sbomFile, 'utf8')) as cdx.Models.Bom
returns a "halfbaked" model, where calls to
const packages: Package[] = bom.components.sorted().map(component => {
const packageUrl: PackageURL = component.purl as PackageURL
return new Package(packageUrl)
})
will raise
TypeError: bom.components.sorted is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment