Working with JSON
Parse json: simple
{"cat": "meow"}yq -p=json sample.jsoncat: meowParse json: complex
{"a":"Easy! as one two three","b":{"c":2,"d":[3,4]}}yq -p=json sample.jsonEncode json: simple
Encode json: simple - in one line
Encode json: comments
Encode json: anchors
Encode json: multiple results
Roundtrip JSON Lines / NDJSON
Roundtrip multi-document JSON
Update a specific document in a multi-document json
Find and update a specific document in a multi-document json
Decode JSON Lines / NDJSON
Last updated