The XML schema does not require an ID for the license property, whereas the JSON schema not only requires it but also enforces that it be one of the SPDX values specified.
This causes problems when a package does not provide an SPDX ID; for example, Microsoft's System.IO package, which only provides a URL, results in the cyclonedx-dotnet tool generating this:
<license> <url>http://go.microsoft.com/fwlink/?LinkId=329770</url> </license>
This validates successfully against the XML schema.
The equivalent JSON:
"license": { "url": "http://go.microsoft.com/fwlink/?LinkId=329770" }
...is considered invalid as it has no ID.
The XML schema does not require an ID for the license property, whereas the JSON schema not only requires it but also enforces that it be one of the SPDX values specified.
This causes problems when a package does not provide an SPDX ID; for example, Microsoft's System.IO package, which only provides a URL, results in the cyclonedx-dotnet tool generating this:
<license> <url>http://go.microsoft.com/fwlink/?LinkId=329770</url> </license>This validates successfully against the XML schema.
The equivalent JSON:
"license": { "url": "http://go.microsoft.com/fwlink/?LinkId=329770" }...is considered invalid as it has no ID.