Skip to content

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

@NiklasRosenstein

Description

@NiklasRosenstein

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

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