{
  "id": 14444243,
  "title": "Repairing one malformed JSONL record with JSONSEEK",
  "url": "https://urgent.news/2026/10/14/repairing-one-malformed-jsonl-record-with-jsonseek",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T12:08:53.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/loehy/repairing-one-malformed-jsonl-record-with-jsonseek-3b81"
  },
  "original_language": "en",
  "account": "When a JSONL file contains a malformed record, it can be challenging to pinpoint and correct the issue. That's where JSONSEEK comes in handy. This tool, developed by the author, simplifies the process of locating the problematic line, previewing a replacement, and then checking the file again. To demonstrate its functionality, a small example is provided.\n\nFirst, the JSONL file is displayed using the command `cat sample.jsonl`. In the shown example, line 2 is identified as the malformed record. Once the issue is known, JSONSEEK's `replaceline` command is used to preview the replacement before making any changes. The second command, `jsonseek replaceline sample.jsonl 2 { id :2, name : Grace } --dry-run`, previews the change.\n\nFor the actual replacement, the command `jsonseek replaceline sample.jsonl 2 { id :2, name : Grace } --backup` is used. This not only makes the change but also creates a backup with the `.bak` extension. The final step is to verify the result using the `shape` command: `jsonseek shape sample.jsonl`. This ensures that the repaired file is now valid.\n\nIn addition to its primary functionality, JSONSEEK offers other command-line interface (CLI) commands for inspecting JSON and JSONL files. These include commands for fields, listing items with `ls`, searching with `query`, and editing values with commands such as `set` and `add`. The tool is released under the MIT license and the repository provides a command reference along with more examples.\n\nWorking with JSONL files often involves finding and repairing malformed records. JSONSEEK simplifies this process by allowing users to inspect the relevant structure or record before making any changes.",
  "summary": "A JSONL file can be awkward to inspect when one record stops parsing. I built JSONSEEK to make that workflow more focused: locate the bad line, preview a replacement, then check the file again. Disclosure: I’m the project’s author. Here’s a small example you can reproduce: cat > sample.jsonl << ' EOF ' {\"id\":1,\"name\":\"Ada\"} {\"id\":2,\"name\":\"unfinished} EOF pip install jsonseek jsonseek shape…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}