CycloneDX::License
Inherits JSON::Serializable / Reference / Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(id : String | Nil = nil, name : String | Nil = nil, url : String | Nil = nil, bom_ref : String | Nil = nil, text : AttachedText | Nil = nil, acknowledgement : String | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
acknowledgement
Sourcebom_ref
Sourceid
Sourcename
Sourcetext
Sourceto_json(json : JSON::Builder)
CycloneDX LicenseChoice wraps the license object: {"license": {...}}.
We override to_json (the JSON::Serializable-generated implementation
would produce a flat object). from_json keeps the flat shape, which is
fine because we never parse SBOM licenses arrays back in.
id is preferred when present (canonical SPDX identifier);
name is the free-form fallback for licenses not in the SPDX list.
to_xml(xml : XML::Builder)
Sourceurl
Source