sops icon indicating copy to clipboard operation
sops copied to clipboard

Trailing comment in YAML causes `Error marshaling to json: invalid character '}' looking for beginning of object key string` when output type is JSON

Open NiklasRosenstein opened this issue 4 months ago • 2 comments

Sops v3.9.1

To reproduce:

$ echo -e 'foo: bar\n#Hello world' | sops --input-type yaml --output-type yaml -e /dev/stdin > test.yaml
$ sops -d test.yaml 
foo: bar
#Hello world
$ sops --output-type json --decrypt --input-type yaml test.yaml 
Error dumping file: Error marshaling to json: invalid character '}' looking for beginning of object key string

NiklasRosenstein avatar Oct 09 '24 06:10 NiklasRosenstein