You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JSON is output is not really JSON, but JSON lines. Proper JSON would be enclosed in square brackets with each item in the array separated by commas. The JSON lines format just puts all objects on its own line.
The implication is that a little pre-processing needs to be done to be usable by something like node's readFile. Jq could do it with jq -s '.' ./result.json > result-array.json.
As I understand, JSON lines makes it possible to stream the output, so the output has advantages. But, the correct format should be documented in the JSON output page.
MattDodsonEnglish
changed the title
Document that json format is actually JSON lines format
Document that JSON format is actually JSON lines format
May 29, 2023
The JSON is output is not really JSON, but JSON lines. Proper JSON would be enclosed in square brackets with each item in the array separated by commas. The JSON lines format just puts all objects on its own line.
The implication is that a little pre-processing needs to be done to be usable by something like node's
readFile
. Jq could do it withjq -s '.' ./result.json > result-array.json
.As I understand, JSON lines makes it possible to stream the output, so the output has advantages. But, the correct format should be documented in the JSON output page.
Related k6 issue: grafana/k6#737
The text was updated successfully, but these errors were encountered: