-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
The current output uses NDJSON (Newline Delimited JSON) which writes individual JSON objects one after another, without wrapping them in a proper JSON array.
{
"id": "4e2239c7-9f0d-4174-82f6-929895ee990c",
...
}
{
"id": "907013e5-c9f1-40e0-9a45-c3294e7a2288",
...
}
This is fine as it can be consumed by jq
(not sure about other tools).
Alternatively, the output could be a valid JSON array containing all result objects:
[
{
"id": "4e2239c7-9f0d-4174-82f6-929895ee990c",
...
},
{
"id": "907013e5-c9f1-40e0-9a45-c3294e7a2288",
...
}
]
Should we do something like ..?
jq -s '.' output.json > output_fixed.json && mv output_fixed.json output.json