How to omit fields when using Python JSONDecoder? or Python JSONDecoder omit fields - is there a clea

14 Replies, 1685 Views

Why not just use `jq` for this? If you're preprocessing JSON, `jq` is a beast for filtering.

Pipe your JSON through something like:
```bash
cat data.json | jq '{keep: .keep, want: .want}'
```

Then parse the trimmed JSON in Python. Not pure-Python, but *stupid* fast for big files.

Messages In This Thread



Users browsing this thread: 1 Guest(s)