Guides · Query & logs

JSON Lines and logs

A dump from ELK, CloudWatch, or Loki is often one object per line, not a single array. JSON.parse on the whole file fails on purpose.

The format

{"ts":"2026-08-29T01:12:03Z","level":"info","order_id":"A1"}
{"ts":"2026-08-29T01:12:04Z","level":"error","order_id":"A1"}

No wrapping [ ], no commas between lines. Append-only writers like that. One object must stay on one line; real newlines inside strings must be \\n.

In HiJSON

Drop a .jsonl file, or paste a single line. Do not paste 200 lines as one document. Filter first with grep or jq -c if the file is large. See large JSON.