Skip to main content

Repair broken JSON and coerce messy LLM outputs into strict Pydantic models.

Project description

Json Repair Tool 🛠️

Stop your AI pipelines from crashing on bad JSON.

json-repair-tool is a zero-config wrapper that combines fuzzy JSON repair with "soft coercion" for Pydantic models. It is designed specifically for handling the messy, non-deterministic output of Large Language Models (LLMs).

The Problem

LLMs are bad at strict structured output. They often return:

  • Markdown code blocks (```json ...)
  • Python booleans (True instead of true)
  • Chatty prefixes ("Here is your data: { ... }")
  • "Fuzzy" types ("$100" instead of 100.0)

Quick Start

pip install json-repair-tool

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json_repair_tool-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json_repair_tool-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file json_repair_tool-0.1.1.tar.gz.

File metadata

  • Download URL: json_repair_tool-0.1.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for json_repair_tool-0.1.1.tar.gz
Algorithm Hash digest
SHA256 225abe01d379fc78f6ec386c8341a5d4b8b4d6af2b1d099216e960def506e96b
MD5 1e7062a0f42c4fea66b30d5cbe986a62
BLAKE2b-256 d42b89db60aef2765d92f0115e503089a05b22651da012306a18c7dd9d8e07b5

See more details on using hashes here.

File details

Details for the file json_repair_tool-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: json_repair_tool-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for json_repair_tool-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7a9e6e670abd8b68dbc99b0a048c10e7c89311f1130517c50e33d443529e406
MD5 1ab7180ae1c3b7269db6b5712537ff98
BLAKE2b-256 18e1ac2dfc5e963aedee570d54d61c69b8bbe14937a49909e918bfc5aacf8429

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page