partialjson
Parse incomplete or partial json
Decision gist · record as of 2026-08-14
Yes. The package solves a real problem—parsing incomplete JSON—with minimal overhead and no dependencies. Active maintenance, permissive MIT license, and a clean API make it a low-risk addition to projects that consume streaming or interrupted JSON data. Not needed for standard, complete JSON parsing.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction—pure Python wheel with no runtime dependencies.
- Active maintenance with recent commits and a modest but steady user base.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects.
last release 2026-02-19 (176 days) · last repo commit 2026-02-19 · 101 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 596,611 downloads/mo, #5,839 on PyPI
Alternatives
Verify before relying
from partialjson import JSONParser
parser = JSONParser()
incomplete_json = '{"name": "John", "age": 30, "items": [1, 2'
result = parser.parse(incomplete_json)
print(result) # {'name': 'John', 'age': 30, 'items': [1, 2]}- Whether strict=False mode handles all edge cases with embedded newlines reliably
- Performance characteristics on very large incomplete JSON payloads
- Exact JSON5 feature coverage when json5 optional dependency is installed
What it is and what it does
Partialjson is a lightweight Python library for extracting structured data from incomplete or truncated JSON strings—a common problem when parsing streaming responses or interrupted data feeds. It recovers valid Python objects from JSON that is missing closing brackets, trailing commas, or other incomplete syntax, without requiring the full payload to be available upfront.
The library offers two parsing modes: strict (default) for standard JSON, and lenient (strict=False) for handling embedded newlines. It also supports JSON5 syntax (comments, unquoted keys, single quotes, trailing commas) when the optional json5 dependency is installed. With zero runtime dependencies in the base package and a simple three-line API, it integrates easily into projects that consume streaming or partially-buffered JSON data.
Use it for
- Parse streaming JSON responses from language models or APIs that send data incrementally before the full payload is complete.
- Recover structured data from log files or network captures where JSON is truncated or interrupted mid-transmission.
- Handle JSON5 configuration files with comments and unquoted keys in development tooling or build systems.
- Extract partial results from real-time data pipelines where downstream consumers need to work with incomplete structures.
- Debug and inspect malformed JSON payloads during development without manual string repair.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a real problem—parsing incomplete JSON—with minimal overhead and no dependencies. Active maintenance, permissive MIT license, and a clean API make it a low-risk addition to projects that consume streaming or interrupted JSON data. Not needed for standard, complete JSON parsing.
Install
partialjson on PyPI
Before you install
Low friction—pure Python wheel with no runtime dependencies. Active maintenance with recent commits and a modest but steady user base.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects.
Quickstart
from partialjson import JSONParser
parser = JSONParser()
incomplete_json = '{"name": "John", "age": 30, "items": [1, 2'
result = parser.parse(incomplete_json)
print(result) # {'name': 'John', 'age': 30, 'items': [1, 2]}
Verify before relying
- Whether strict=False mode handles all edge cases with embedded newlines reliably
- Performance characteristics on very large incomplete JSON payloads
- Exact JSON5 feature coverage when json5 optional dependency is installed
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 176 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 596,611 / month, #5,839 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: partialjson-1.1.0-py3-none-any.whl
Tags
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 › “truncated json handling”
- partialjsonParses incomplete or malformed JSON strings into valid Python…
- json-repairParses and repairs malformed JSON strings from LLMs, APIs, logs, and…
- jiterA fast JSON parser that converts bytes into Python objects, offering…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
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.
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.
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.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
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.
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.
See also jiter · partial-json-parser · json5 · pyjson5 · json5kit · streamingjson · fix-busted-json · json-five · json-repair · hjson