← All work

Python

jsonmend

A zero-dependency library and CLI that extracts and repairs JSON from messy LLM output: Markdown fences, prose, single and smart quotes, Python constants, unquoted keys, comments, trailing commas, and responses truncated mid-object.

CI passing · Python

jsonmend

Highlights

  • Strips code fences and pulls the JSON out of surrounding prose
  • Fixes single/smart quotes, True/None, unquoted keys, comments, trailing commas
  • Closes brackets and strings on output cut off at a token limit
  • String-aware throughout, pure stdlib, 43 tests, CI on Python 3.9 to 3.12

Want the code?

View on GitHub