CycloneDX / CycloneDX/cyclonedx-cli

Conversion creates invalid SPDX JSON

Open
#361 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
541
Forks
82
PR merge metrics
No merged PRs in 30d

Description

[hello.spdx.json.txt](https://github.com/CycloneDX/cyclonedx-cli/files/14908606/hello.spdx.json.txt)
[hello.cdx.json.txt](https://github.com/CycloneDX/cyclonedx-cli/files/14908607/hello.cdx.json.txt)

Convert ```hello.spdx.json```from SPDX to CycloneDX:
```
cyclonedx convert --input-file hello.spdx.json --input-format autodetect --output-file hello.cdx.json --output-format json
```
Try to convert the result back to SPDX:
```
cyclonedx convert --output-file hello2.spdx.json --output-format spdxjson --input-file hello.cdx.json --input-format json
```
Result:
```
Unhandled exception: System.Text.Json.JsonException: '}' is invalid after a single JSON value. Expected end of data. Path: $ | LineNumber: 182 | BytePositionInLine: 3.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.