CycloneDX / CycloneDX/cyclonedx-cli
Add option to disable Unicode escaping of characters like `&`
- Dominant language
- C#
- Stars
- 541
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
When merging SBOMs using the CycloneDX CLI, characters like `&` are currently encoded as Unicode escape sequences (`\u0026`) in the resulting JSON output, even though this is not required by the JSON specification.
### Problem
Printable characters such as the ampersand (`&`) are unnecessarily escaped in the generated JSON:
```json
"author": "ACME R\u0026D Team"
```
This reduces readability and creates noisy diffs in version control, even though these characters are perfectly valid in JSON when unescaped.
### Feature Request
Please consider adding a CLI option such as `--no-ascii-escape` or `--preserve-utf8` that outputs characters like `&` as-is, without escaping them to Unicode:
```json
"author": "ACME R&D Team"
```
### Benefits
- Improves human readability of SBOM files
- Reduces unnecessary changes in version control
- Matches behavior of other JSON serializers like Python's `json.dump(..., ensure_ascii=False)
`
Contributor guide
Assessment
This issue has not been assessed yet.