Hi all, I wanted to share some serialization proposal files that further discussions might be based on. Please find attached: - SPDX 2 file for reference - SPDX 3 conversion of that file in JSON-LD and expanded JSON-LD format - a conversion of these JSON-LD files into the turtle format
Note that the conversion might not yet work fully as intended, but I hope the overall structure is still helpful to have a look at. Greetings, Armin -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5059): https://lists.spdx.org/g/Spdx-tech/message/5059 Mute This Topic: https://lists.spdx.org/mt/98060775/21656 Group Owner: [email protected] Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
SPDX2_example.json
Description: application/json
SPDX3_example_jsonld.json
Description: application/json
SPDX3_example_jsonld_expanded.json
Description: application/json
@prefix ns0: <https://spdx.org/rdf/Core#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @prefix ns1: <https://spdx.org/rdf/Software#> . <https://some.namespace#[email protected]> a <https://spdx.org/rdf/Core#Person> ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:name "creatorName"^^xsd:string . <https://some.namespace#SPDXRef-DOCUMENT> a ns0:SpdxDocument ; ns0:comment "documentComment"^^xsd:string ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:imports [ a ns0:ExternalMap ; ns0:externalId "DocumentRef-external"^^xsd:anyURI ; ns0:locationHint "https://namespace.com"^^xsd:anyURI ; ns0:verifiedUsing [ a ns0:Hash ; ns0:algorithm "SHA1"^^ns0:HashAlgorithm ; ns0:hashValue "71c4025dd9897b364f3ebbb42c484ff43d00791c"^^xsd:string ] ] ; ns0:name "documentName"^^xsd:string . <https://some.namespace#[email protected]> a ns0:Person ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:name "originatorName"^^xsd:string . <https://some.namespace#SPDXRef-Package> a <https://spdx.org/rdf/Software#Package> ; ns0:comment "packageComment"^^xsd:string ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:description "packageDescription"^^xsd:string ; ns0:name "packageName"^^xsd:string ; ns0:originatedBy "https://some.namespace#[email protected]"^^ns0:Identity ; ns0:summary "packageSummary"^^xsd:string ; ns0:verifiedUsing [ a ns0:Hash ; ns0:algorithm "SHA1"^^ns0:HashAlgorithm ; ns0:hashValue "71c4025dd9897b364f3ebbb42c484ff43d00791c"^^xsd:string ] ; ns1:downloadLocation "https://download.com"^^xsd:anyURI ; ns1:packagePurpose "SOURCE"^^ns1:SoftwarePurpose . <https://some.namespace#SPDXRef-File> a ns1:File ; ns0:comment "fileComment"^^xsd:string ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:name "./fileName.py"^^xsd:string ; ns0:verifiedUsing [ a ns0:Hash ; ns0:algorithm "SHA1"^^ns0:HashAlgorithm ; ns0:hashValue "71c4025dd9897b364f3ebbb42c484ff43d00791c"^^xsd:string ] . <https://some.namespace#SPDXRef-Snippet> a ns1:Snippet ; ns0:comment "snippetComment"^^xsd:string ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:name "snippetName"^^xsd:string ; ns1:byteRange "1"^^ns1:positiveIntegerRange, "2"^^ns1:positiveIntegerRange ; ns1:lineRange "3"^^ns1:positiveIntegerRange, "4"^^ns1:positiveIntegerRange . <https://some.namespace#SPDXRef-Relationship-0> a ns0:Relationship ; ns0:comment "relationshipComment"^^xsd:string ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-01 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:relationshipType "DESCRIBES"^^ns0:RelationshipType ; ns0:to "SPDXRef-File"^^ns0:Element . <https://some.namespace#[email protected]> a ns0:Person ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-24 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:name "annotatorName"^^xsd:string . <https://some.namespace#SPDXRef-Annotation-0> a ns0:Annotation ; ns0:annotationType "REVIEW"^^ns0:AnnotationType ; ns0:creationInfo [ a ns0:CreationInformation ; ns0:comment "documentComment"^^xsd:string ; ns0:created "2022-12-24 00:00:00"^^xsd:dateTime ; ns0:createdBy "https://some.namespace#[email protected]"^^ns0:Entity ; ns0:dataLicense "CC0-1.0"^^xsd:string ; ns0:profile "core"^^ns0:ProfileIdentifier, "software"^^ns0:ProfileIdentifier, "licensing"^^ns0:ProfileIdentifier ; ns0:specVersion "3.0.0"^^ns0:SemVer ] ; ns0:statement "annotationComment"^^xsd:string ; ns0:subject "SPDXRef-File"^^ns0:Element . [] ns0:element <https://some.namespace#[email protected]>, <https://some.namespace#SPDXRef-DOCUMENT>, <https://some.namespace#[email protected]>, <https://some.namespace#SPDXRef-Package>, <https://some.namespace#SPDXRef-File>, <https://some.namespace#SPDXRef-Snippet>, <https://some.namespace#SPDXRef-Relationship-0>, <https://some.namespace#[email protected]>, <https://some.namespace#SPDXRef-Annotation-0> .
