Description
The declared license of a package is what we find in a package manifest license-related fields.
Today we take the values of fields and use a simple line separation.
Instead we should keep the field names and store that as JSON too, keeping some of the original structure such that we can a better determination/normalization of the license when we populate the license_expression field.
For instance this is a Maven POM snippet:
<licenses>
<license>
<name>BSD</name>
<url>http://www.jcraft.com/jzlib/LICENSE.txt</url>
</license>
</licenses>
and an npm package.json snippet (rather weird as it has both a legacy and new style of license tags:
{
"license": "Apache-2.0",
...
"licenses": [
{
"type": "Apache 2.0",
"url": "https://github.com/spenceralger/grunt-esvm/blob/master/LICENSE.md"
}
],
...
}
We should in these cases store and report something such as:
- maven:
"name": "BSD, "url": http://www.jcraft.com/jzlib/LICENSE.txt"
- npm:
"license": "Apache-2.0", "type": "Apache 2.0", "url": "https://github.com/spenceralger/grunt-esvm/blob/master/LICENSE.md"
Description
The declared license of a package is what we find in a package manifest license-related fields.
Today we take the values of fields and use a simple line separation.
Instead we should keep the field names and store that as JSON too, keeping some of the original structure such that we can a better determination/normalization of the license when we populate the
license_expressionfield.For instance this is a Maven POM snippet:
and an npm package.json snippet (rather weird as it has both a legacy and new style of license tags:
We should in these cases store and report something such as:
"name": "BSD, "url": http://www.jcraft.com/jzlib/LICENSE.txt""license": "Apache-2.0", "type": "Apache 2.0", "url": "https://github.com/spenceralger/grunt-esvm/blob/master/LICENSE.md"