Post

Working with JSONL Files in Python

JSONL (JSON Lines) is underrated:

  • Great for streaming structured logs
  • Easy to parse with low memory overhead
  • One object per line = grep-friendly

Python snippet to load:

1
2
3
4
5
import json
with open("file.jsonl") as f:
    for line in f:
        print(json.loads(line))

This post is licensed under CC BY 4.0 by the author.