Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 393 Bytes

jq_jsonl_conversion.md

File metadata and controls

18 lines (13 loc) · 393 Bytes

jq: JSONL ↔︎ JSON conversion

Prerequisites

  • jqhttps://jqlang.github.io/jq/ — "like sed for JSON data"

    There are several options available for installing jq. I prefer to use Homebrew: brew install jq

  1. JSONL → JSON

    jq -s '.' input.jsonl > output.json
  2. JSON → JSONL

    jq -c '.[]' input.json > output.jsonl