--- id: fix-busted-json version: "0.0.19" license: unclear license_treatment: permissive maintenance: aging --- # fix-busted-json — Fixes broken JSON string objects License: permissive · Maintenance: aging · Downloads: 100.7K/mo ## What it is and what it does fix-busted-json is a Python utility that takes JSON strings with common syntax violations and returns valid JSON. It handles unquoted keys, incorrect quote styles (single quotes, backticks, curly quotes), missing commas, trailing commas, Python literals (True/False/None), string concatenation, and various escaping edge cases. The package also provides helper functions to locate and extract JSON objects embedded within plain text—a use case that emerged from processing large language model outputs, which often produce JSON-like structures with syntax errors. The package has no runtime dependencies and supports Python 3.6 and later. It is designed as a lightweight, focused tool for a specific problem: when you have text containing JSON that is almost valid but has known categories of errors, fix-busted-json can normalize it into parseable form without requiring manual intervention or complex error handling. Use it for: - Extract and repair JSON output from large language model completions that contain syntax errors - Parse JSON-like objects embedded in log files or unstructured text with quote and comma issues - Normalize malformed JSON responses from APIs or third-party tools before processing - Find and pretty-print all JSON objects within a larger text document, including nested objects - Convert Python dict-like syntax (with True/False/None) into valid JSON for downstream processing ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Repairs malformed JSON strings by fixing common syntax errors like unquoted keys, wrong quote types, missing commas, and Python literal values, then optionally extracts JSON objects from surrounding text. Yes, if you regularly encounter malformed JSON from LLMs or need to extract JSON from unstructured text. The package is lightweight, dependency-free, and handles a well-defined set of real-world syntax errors. The aging maintenance status is not a blocker for a focused utility with no external dependencies and no known vulnerabilities, but do not expect active development or rapid response to new issues. ## Install pip install fix-busted-json uv add fix-busted-json poetry add fix-busted-json ## Installing fix-busted-json Before you install: Low install friction with no runtime dependencies. Maintenance status is aging (208 days since last release), though the package was last released 2026-01-18. License in practice: MIT license (permissive) allows free use, modification, and distribution with minimal restrictions. Quickstart: pip install fix-busted-json from fix_busted_json import repair_json invalid_json = "{ name: 'John' 'age': 30, 'city': 'New' + ' York', }" fixed_json = repair_json(invalid_json) print(fixed_json) Requires Python 3.6 or later. Verify before relying: - Whether the repair heuristics handle all edge cases reliably or fail gracefully on deeply nested or unusual malformed JSON - Performance characteristics on very large JSON strings or documents with many embedded objects ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 100.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fix broken json, repair invalid json, json syntax fixer, extract json from text, parse malformed json, json error correction, llm json output repair, json-repair, llm-output, text-extraction [View on SkillFed](https://skillfed.io/packages/fix-busted-json) · [View on PyPI](https://pypi.org/project/fix-busted-json/)