$npx skillfedfor your agent

partial-json-parser

Parse partial JSON generated by LLM

Worth itPyPI Text ProcessingReleased Nov 20256.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — partial_json_parser-0.2.1.1.post7-py3-none-any.whl
v0.2.1.1.post7 · released 2025-11-17 · Python >=3.6

Yes. This is a specialized, well-maintained tool with zero dependencies, permissive licensing, and a clear use case in modern LLM-streaming workflows. The active maintenance, recent releases, and top-5000 PyPI position indicate real adoption. Install if you're building applications that stream structured JSON from language models.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.6 or later.
  • Zero runtime dependencies and pure Python implementation make installation frictionless.
  • Active maintenance with recent releases; last commit 2026-04-22 and latest release 2025-11-17 indicate ongoing support.

License · maintenance · safety

MIT (permissive) — MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.

last release 2025-11-17 (270 days) · last repo commit 2026-04-22 · 137 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,367,402 downloads/mo, #1,920 on PyPI

Verify before relying

pip install partial-json-parser

from partial_json_parser import loads

result = loads('{"key": "v')  # Returns: {'key': 'v'}

# Or complete the JSON string:
from partial_json_parser import ensure_json
completed = ensure_json('{"key": "v')  # Returns: '{"key": "v"}'
  • Performance characteristics when parsing very large incomplete JSON structures.
  • Behavior with deeply nested or complex partial JSON edge cases beyond the documented examples.
Same gist for agents: .md · .json

What it is and what it does

partial-json-parser handles a specific problem in LLM integration: when streaming JSON responses token-by-token, the JSON is incomplete until the final token arrives, making standard JSON parsing fail. This library extracts and returns whatever valid data it can from incomplete JSON, and can also complete partial JSON strings to valid syntax so they parse cleanly.

The parser works like the standard json.loads when given complete JSON, but accepts an optional `allow_partial` parameter (bitwise flags from the `Allow` enum) to specify which data types are permitted to be incomplete—strings, numbers, arrays, objects, booleans, null, or special values like NaN and Infinity. By default it allows all partial types. It has zero runtime dependencies, is implemented in pure Python, and includes type hints.

Use it for

  • Stream structured data from LLM APIs (OpenAI, Anthropic, etc.) and display partial results to users as tokens arrive.
  • Extract valid JSON objects from incomplete LLM responses mid-generation without waiting for completion.
  • Build chat interfaces that show structured data (like JSON-formatted lists or tables) incrementally as the model generates them.
  • Parse and validate JSON from sources that may truncate or cut off mid-response, recovering what data is available.
  • Debug or inspect malformed JSON by attempting to extract the maximum valid structure before the error point.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a specialized, well-maintained tool with zero dependencies, permissive licensing, and a clear use case in modern LLM-streaming workflows. The active maintenance, recent releases, and top-5000 PyPI position indicate real adoption. Install if you're building applications that stream structured JSON from language models.

Install

partial-json-parser on PyPI

Before you install

Zero runtime dependencies and pure Python implementation make installation frictionless. Active maintenance with recent releases; last commit 2026-04-22 and latest release 2025-11-17 indicate ongoing support.

Requires Python 3.6 or later.

License in practice

MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install partial-json-parser

from partial_json_parser import loads

result = loads('{"key": "v')  # Returns: {'key': 'v'}

# Or complete the JSON string:
from partial_json_parser import ensure_json
completed = ensure_json('{"key": "v')  # Returns: '{"key": "v"}'

Verify before relying

  • Performance characteristics when parsing very large incomplete JSON structures.
  • Behavior with deeply nested or complex partial JSON edge cases beyond the documented examples.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.6
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 270 days since the last release
Last repo commit
First released
Downloads6,367,402 / month, #1,920 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: Developers

Evidence: partial_json_parser-0.2.1.1.post7-py3-none-any.whl

Tags

Capabilities
parse incomplete jsonllm streaming jsonpartial json parserjson from language modelsincomplete json handlingstream json parsingjson completion
Topics
llm-integrationjson-streaming
PyPI keywords
JSONparserLLMnlp

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “parse incomplete json”

  • partial-json-parserParses incomplete JSON strings generated by LLM streaming, extracting…
  • partialjsonParses incomplete or malformed JSON strings into valid Python…
  • streamingjsonCompletes partial JSON strings into syntactically valid JSON by…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.

Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.

Install it if your project requires CSS tokenization or syntax manipulation.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also json-repair · langdiff · partialjson · streamingjson · jiter · dirtyjson · fix-busted-json · json-five · instructor · prefixdate