Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix all jsonld examples #762

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions serialization/json_ld/examples/agent1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "John Smith",
"externalIdentifier": [
Expand Down
4 changes: 1 addition & 3 deletions serialization/json_ld/examples/annotation1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "Acme Corp. Super SBOM-o-lator",
"annotationType": "review",
Expand Down
113 changes: 55 additions & 58 deletions serialization/json_ld/examples/converted_from_spdx_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"createdUsing": [
"spdx-example:SPDXRef-Actor-LicenseFind-1.0"
],
"profile": [
"core",
"software",
"licensing"
],
"dataLicense": "https://spdx.org/licenses/CC0-1.0",
"comment": "This is the SPDX-2.3 JSON example converted to SPDX-3.0. As there is currently no closure on how to treat licenses, they are omitted here for now."
},
{
Expand All @@ -50,6 +44,10 @@
"creationInfo": "_:creationInfo1",
"name": "SPDX-Tools-v2.0",
"comment": "This document was created using SPDX 2.0 using licenses from the web site.",
"profileConformance": [
"core",
"software"
],
"element": [
"spdx-example:SPDXRef-Actor-LicenseFind-1.0",
"spdx-example:SPDXRef-Actor-ExampleCodeInspect",
Expand Down Expand Up @@ -88,7 +86,7 @@
"spdx-example:SPDXRef-File",
"spdx-example:SPDXRef-Package"
],
"namespaces": [
"namespaceMap": [
{
"type": "NamespaceMap",
"prefix": "DocumentRef-spdx-tool-1.2",
Expand All @@ -98,7 +96,7 @@
"imports": [
{
"type": "ExternalMap",
"externalId": "DocumentRef-spdx-tool-1.2:SPDXRef-DOCUMENT",
"externalSpdxId": "DocumentRef-spdx-tool-1.2:SPDXRef-DOCUMENT",
"verifiedUsing": [
{
"type": "Hash",
Expand Down Expand Up @@ -136,7 +134,7 @@
"creationInfo": "_:creationInfo1"
},
{
"type": "Package",
"type": "software_Package",
"spdxId": "spdx-example:SPDXRef-Package",
"name": "glibc",
"summary": "GNU C library.",
Expand All @@ -159,7 +157,7 @@
},
{
"type": "Hash",
"algorithm": "blake2B384",
"algorithm": "blake2b384",
"hashValue": "aaabd89c926ab525c242e6621f2f5fa73aa4afe3d9e24aed727faaadd6af38b620bdb623dd2b4788b1c8086984af8706"
}
],
Expand All @@ -173,42 +171,38 @@
"originatedBy": [
"spdx-example:SPDXRef-Actor-ExampleCodeInspect-contact@example.com"
],
"suppliedBy": [
"spdx-example:SPDXRef-Actor-JaneDoe-jane.doe@example.com"
],
"suppliedBy": "spdx-example:SPDXRef-Actor-JaneDoe-jane.doe@example.com" ,
"builtTime": "2011-01-29T18:30:22Z",
"releaseTime": "2012-01-29T18:30:22Z",
"validUntilTime": "2014-01-29T18:30:22Z",
"purpose": [
"source"
],
"copyrightText": "Copyright 2008-2010 John Smith",
"attributionText": "The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.",
"packageVersion": "2.11.1",
"downloadLocation": "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
"homepage": "http://ftp.gnu.org/gnu/glibc",
"sourceInfo": "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
"software_primaryPurpose": "source",
"software_copyrightText": "Copyright 2008-2010 John Smith",
"software_attributionText": "The GNU C Library is free software. See the file COPYING.LIB for copying conditions, and LICENSES for notices about a few contributions that require these additional notices to be distributed. License copyright years may be listed using range notation, e.g., 1996-2015, indicating that every year in the range, inclusive, is a copyrightable year that would otherwise be listed individually.",
"software_packageVersion": "2.11.1",
"software_downloadLocation": "http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
"software_homePage": "http://ftp.gnu.org/gnu/glibc",
"software_sourceInfo": "uses glibc-2_11-branch from git://sourceware.org/git/glibc.git.",
"creationInfo": "_:creationInfo1"
},
{
"type": "Package",
"type": "software_Package",
"spdxId": "spdx-example:SPDXRef-fromDoap-1",
"name": "Apache Commons Lang",
"homepage": "http://commons.apache.org/proper/commons-lang/",
"software_homePage": "http://commons.apache.org/proper/commons-lang/",
"creationInfo": "_:creationInfo1"
},
{
"type": "Package",
"type": "software_Package",
"spdxId": "spdx-example:SPDXRef-fromDoap-0",
"name": "Jena",
"packageVersion": "3.12.0",
"downloadLocation": "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz",
"packageUrl": "pkg:maven/org.apache.jena/apache-jena@3.12.0",
"homepage": "http://www.openjena.org/",
"software_packageVersion": "3.12.0",
"software_downloadLocation": "https://search.maven.org/remotecontent?filepath=org/apache/jena/apache-jena/3.12.0/apache-jena-3.12.0.tar.gz",
"software_packageUrl": "pkg:maven/org.apache.jena/apache-jena@3.12.0",
"software_homePage": "http://www.openjena.org/",
"creationInfo": "_:creationInfo1"
},
{
"type": "Package",
"type": "software_Package",
"spdxId": "spdx-example:SPDXRef-Saxon",
"name": "Saxon",
"description": "The Saxon package is a collection of tools for processing XML documents.",
Expand All @@ -219,15 +213,16 @@
"hashValue": "85ed0817af83a24ad8da68c2b5094de69833983c"
}
],
"copyrightText": "Copyright Saxonica Ltd",
"packageVersion": "8.8",
"downloadLocation": "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
"homepage": "http://saxon.sourceforge.net/",
"software_copyrightText": "Copyright Saxonica Ltd",
"software_packageVersion": "8.8",
"software_downloadLocation": "https://sourceforge.net/projects/saxon/files/Saxon-B/8.8.0.7/saxonb8-8-0-7j.zip/download",
"software_homePage": "http://saxon.sourceforge.net/",
"creationInfo": "_:creationInfo1"
},
{
"type": "File",
"type": "software_File",
"spdxId": "spdx-example:SPDXRef-DoapSource",
"creationInfo": "_:creationInfo1",
"name": "./src/org/spdx/parser/DOAPProject.java",
"verifiedUsing": [
{
Expand All @@ -236,10 +231,10 @@
"hashValue": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12"
}
],
"copyrightText": "Copyright 2010, 2011 Source Auditor Inc."
"software_copyrightText": "Copyright 2010, 2011 Source Auditor Inc."
},
{
"type": "File",
"type": "software_File",
"spdxId": "spdx-example:SPDXRef-CommonsLangSrc",
"name": "./lib-source/commons-lang3-3.1-sources.jar",
"comment": "This file is used by Jena",
Expand All @@ -250,12 +245,13 @@
"hashValue": "c2b4e1c67a2d28fced849ee1bb76e7391b93f125"
}
],
"copyrightText": "Copyright 2001-2011 The Apache Software Foundation",
"software_copyrightText": "Copyright 2001-2011 The Apache Software Foundation",
"creationInfo": "_:creationInfo1"
},
{
"type": "File",
"type": "software_File",
"spdxId": "spdx-example:SPDXRef-JenaLib",
"creationInfo": "_:creationInfo1",
"name": "./lib-source/jena-2.6.3-sources.jar",
"comment": "This file belongs to Jena",
"verifiedUsing": [
Expand All @@ -265,10 +261,10 @@
"hashValue": "3ab4e1c67a2d28fced849ee1bb76e7391b93f125"
}
],
"copyrightText": "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP"
"software_copyrightText": "(c) Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP"
},
{
"type": "File",
"type": "software_File",
"spdxId": "spdx-example:SPDXRef-Specification",
"name": "./docs/myspec.pdf",
"comment": "Specification Documentation",
Expand All @@ -282,7 +278,7 @@
"creationInfo": "_:creationInfo1"
},
{
"type": "File",
"type": "software_File",
"spdxId": "spdx-example:SPDXRef-File",
"name": "./package/foo.c",
"comment": "The concluded license was taken from the package level that the file was included in.\nThis information was found in the COPYING.txt file in the xyz directory.",
Expand All @@ -298,22 +294,24 @@
"hashValue": "624c1abb3664f4b35547e7c73864ad24"
}
],
"copyrightText": "Copyright 2008-2010 John Smith",
"software_copyrightText": "Copyright 2008-2010 John Smith",
"creationInfo": "_:creationInfo1"
},
{
"type": "Snippet",
"type": "software_Snippet",
"spdxId": "spdx-example:SPDXRef-Snippet",
"name": "from linux kernel",
"comment": "This snippet was identified as significant and highlighted in this Apache-2.0 file, when a commercial scanner identified it as being derived from file foo.c in package xyz which is licensed under GPL-2.0.",
"copyrightText": "Copyright 2008-2010 John Smith",
"byteRange": {
"begin": 310,
"end": 420
"software_copyrightText": "Copyright 2008-2010 John Smith",
"software_byteRange": {
"type": "PositiveIntegerRange",
"beginIntegerRange": 310,
"endIntegerRange": 420
},
"lineRange": {
"begin": 5,
"end": 23
"software_lineRange": {
"type": "PositiveIntegerRange",
"beginIntegerRange": 5,
"endIntegerRange": 23
},
"creationInfo": "_:creationInfo1"
},
Expand All @@ -334,18 +332,17 @@
"to": [
"spdx-example:DocumentRef-spdx-tool-1.2:SPDXRef-ToolsElement"
],
"relationshipType": "copy",
"relationshipType": "copiedTo",
"creationInfo": "_:creationInfo1"
},
{
"type": "SoftwareDependencyRelationship",
"spdxId": "spdx-example:SPDXRef-Relationship-2",
"type": "Relationship",
"spdxId": "spdx-example:SPDXef-Relationship-2",
"from": "spdx-example:SPDXRef-Package",
"to": [
"spdx-example:SPDXRef-Saxon"
],
"relationshipType": "dependsOn",
"softwareLinkage": "dynamic",
"creationInfo": "_:creationInfo1"
},
{
Expand All @@ -361,11 +358,11 @@
{
"type": "Relationship",
"spdxId": "spdx-example:SPDXRef-Relationship-5",
"from": "spdx-example:SPDXRef-Specification",
"from": "spdx-example:SPDXRef-fromDoap-0",
"to": [
"spdx-example:SPDXRef-fromDoap-0"
"spdx-example:SPDXRef-Specification"
],
"relationshipType": "specificationFor",
"relationshipType": "hasSpecification",
"creationInfo": "_:creationInfo1"
},
{
Expand Down
11 changes: 4 additions & 7 deletions serialization/json_ld/examples/file1.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"@context": "https://spdx.org/rdf/3.0.0/spdx-context.jsonld",
"type": "File",
"type": "software_File",
"spdxId": "https://some.namespace#file1",
"creationInfo": {
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core", "software"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "model.png",
"contentType": "image/png",
"purpose": ["documentation"],
"contentIdentifier": "https://github.com/spdx/spdx-3-model/blob/main/model.png",
"software_contentType": "image/png",
"software_primaryPurpose": "documentation",
"originatedBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
}
4 changes: 1 addition & 3 deletions serialization/json_ld/examples/org1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "spdx.dev"
}
25 changes: 11 additions & 14 deletions serialization/json_ld/examples/package1.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
{
"@context": "https://spdx.org/rdf/3.0.0/spdx-context.jsonld",
"type": "Package",
"type": "software_Package",
"spdxId": "https://some.namespace#SPDXRef-Package",
"creationInfo": {
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core", "software"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "packageName",
"summary": "packageSummary",
"description": "packageDescription",
"comment": "packageComment",
"packageVersion": "12.2",
"downloadLocation": "https://download.com",
"packageUrl": "https://some.purl",
"homepage": "https://homepage.com",
"purpose": ["source"],
"contentIdentifier": "urn:spdx.dev:pkg:123456789",
"software_packageVersion": "12.2",
"software_downloadLocation": "https://download.com",
"software_packageUrl": "https://some.purl",
"software_homePage": "https://homepage.com",
"software_primaryPurpose": "source",
"originatedBy": ["https://some.namespace#SPDXRef-Agent-creatorName-some@mail.com"],
"suppliedBy": ["https://some.namespace#john_smith"],
"suppliedBy": "https://some.namespace#john_smith",
"verifiedUsing": [
{
"type": "Hash",
Expand All @@ -34,10 +31,10 @@
"hashValue": "fbea580d286bbbbb41314430d58ba887716a74d7134119c5307cdc9f0c7a4299"
}
],
"externalReference": [
"externalRef": [
{
"type": "ExternalReference",
"externalReferenceType": "securityFix",
"type": "ExternalRef",
"externalRefType": "securityFix",
"locator": ["https://support.com"]
}
]
Expand Down
4 changes: 1 addition & 3 deletions serialization/json_ld/examples/person1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"name": "John Smith",
"externalIdentifier": [
Expand Down
2 changes: 0 additions & 2 deletions serialization/json_ld/examples/person2.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"createdUsing": ["https://some.namespace#sbomolator_v2"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0",
"comment": "Source: payroll list, 20221130"
},
"name": "Alice Stone",
Expand Down
4 changes: 1 addition & 3 deletions serialization/json_ld/examples/relationship1.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"type": "CreationInfo",
"specVersion": "3.0.0",
"created": "2022-12-01T00:00:00Z",
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"],
"profile": ["core"],
"dataLicense": "https://spdx.org/licenses/CC0-1.0"
"createdBy": ["https://spdx.dev/elements/3F26391C#spdx-dev"]
},
"from": "https://some.namespace#SPDXRef-Package",
"to": [
Expand Down