Skip to content

Relationship comment deleted when converting json file to tag-value #44

@meretp

Description

@meretp

When converting the following json file

{
  "SPDXID" : "SPDXRef-DOCUMENT",
  "spdxVersion" : "SPDX-2.3",
  "creationInfo" : {
    "created" : "2022-01-01T00:00:00Z",
    "creators" : [ "Tool: test-tool" ]
  },
  "name" : "document name",
  "dataLicense" : "CC0-1.0",
  "documentDescribes" : [ "SPDXRef-fileA"],
  "documentNamespace" : "https://some.namespace",
  "files" : [  {
    "SPDXID" : "SPDXRef-fileA",
    "checksums" : [ {
      "algorithm" : "SHA1",
      "checksumValue" : "d6a770ba38583ed4bb4525bd96e50461655d2758"
    } ],
    "fileName" : "./fileA.c"
  } ],
  "relationships" : [ {
    "spdxElementId" : "SPDXRef-fileA",
    "relationshipType" : "DESCRIBED_BY",
    "relatedSpdxElement" : "SPDXRef-DOCUMENT",
    "comment" : "comment on DESCRIBED_BY"
  } ]
}

to a tag-value file, the result is

DataLicense: CC0-1.0
DocumentNamespace: https://some.namespace
DocumentName: document name
SPDXID: SPDXRef-DOCUMENT

## Creation Information
Creator: Tool: test-tool
Created: 2022-01-01T00:00:00Z
## Relationships
Relationship: SPDXRef-DOCUMENT DESCRIBES SPDXRef-fileA

FileName: ./fileA.c
SPDXID: SPDXRef-fileA
FileChecksum: SHA1: d6a770ba38583ed4bb4525bd96e50461655d2758
LicenseConcluded: NOASSERTION
## Relationships
Relationship: SPDXRef-fileA DESCRIBED_BY SPDXRef-DOCUMENT

where the comment on the relationship SPDXRef-fileA DESCRIBED_BY SPDXRef-DOCUMENT is deleted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions