Error unmarshalling file : Expected JSON object start, got delimiter [ instead
Using the following dummy data to create a dummy.json file: https://microsoftedge.github.io/Demos/json-dummy-data/64KB.json
Trying to encrypt the file using sops:
sops encrypt --age <age> dummy.json > dummy.json.enc
Receive the error: Error unmarshalling file: Could not unmarshal input data: Expected JSON object start, got delimiter [ instead.
The JSON file is perfectly valid and just starts with an array instead of on object.
SOPS only supports JSON files with a global mapping, not other top-level JSON types. Your file is a top-level array.
SOPS only supports JSON files with a global mapping, not other top-level JSON types. Your file is a top-level array.
Understood. Would be nice if this were documented somewhere and/or the error message would say so, since this is perfectly valid JSON. Checking https://github.com/getsops/sops?tab=readme-ov-file#json-and-json-binary-indentation doesn't say anything about global mapping. Also trying other samples (https://sample.json-format.com/) with the same result (obviously - also arrays).