json-flatten
Python functions for flattening a JSON object to a single dictionary of pairs, and unflattening that dictionary back to a JSON object
Decision gist · record as of 2026-08-14
Yes, if you need JSON flattening with type preservation and have no special Python version requirements. The zero-dependency design and low install friction make it straightforward to add. However, the aging maintenance status (706 days since last release) means you should verify it handles your specific JSON structures before relying on it in production; consider forking or monitoring the repository if you need ongoing support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: no runtime dependencies, pure Python wheel.
- Aging maintenance status—last release was 706 days ago and repository shows no recent activity, though it remains unarchived.
License · maintenance · safety
Apache License, Version 2.0 (permissive) — Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2024-09-07 (706 days) · last repo commit 2026-02-13 · 56 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 538,007 downloads/mo, #6,117 on PyPI
Alternatives
Verify before relying
pip install json-flatten
import json_flatten
flat = json_flatten.flatten({"foo": {"bar": [1, True, None]}})
original = json_flatten.unflatten(flat)- Whether the package handles edge cases like circular references or very deeply nested structures.
- Performance characteristics on large or complex JSON structures.
- Python version compatibility (requires_python is unspecified in metadata).
What it is and what it does
json-flatten provides two core functions: flatten() converts a nested JSON dictionary into a single-level dictionary with dot-notation keys and type suffixes (e.g., `user.age$int`), and unflatten() reverses the process. It preserves type information for integers, floats, booleans, nulls, and empty containers through suffix markers, and represents list indices using bracket notation like `items.[0]`.
The package is designed for scenarios where you need to represent JSON as HTML form data or URL query parameters—contexts where nested structures don't map naturally. It handles arbitrarily nested objects and lists, including matrices and mixed nesting patterns, all without external dependencies.
Use it for
- Serialize nested JSON to HTML form fields while preserving type information for round-trip conversion.
- Encode complex JSON structures as URL query string parameters for API requests.
- Flatten configuration objects for storage in flat key-value databases or environment variables.
- Convert JSON payloads to flat dictionaries for compatibility with legacy systems expecting single-level data.
- Debug and inspect deeply nested JSON by viewing all paths and values in a single flat view.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need JSON flattening with type preservation and have no special Python version requirements.
The zero-dependency design and low install friction make it straightforward to add. However, the aging maintenance status (706 days since last release) means you should verify it handles your specific JSON structures before relying on it in production; consider forking or monitoring the repository if you need ongoing support.
Install
json-flatten on PyPI
Before you install
Low friction: no runtime dependencies, pure Python wheel. Aging maintenance status—last release was 706 days ago and repository shows no recent activity, though it remains unarchived.
License in practice
Apache License 2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install json-flatten
import json_flatten
flat = json_flatten.flatten({"foo": {"bar": [1, True, None]}})
original = json_flatten.unflatten(flat)
Verify before relying
- Whether the package handles edge cases like circular references or very deeply nested structures.
- Performance characteristics on large or complex JSON structures.
- Python version compatibility (requires_python is unspecified in metadata).
Package facts
| License | Apache License, Version 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 706 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 538,007 / month, #6,117 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: json_flatten-0.3.1-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 › “flatten json to dictionary”
- json-flattenConverts nested JSON objects into flat key-value dictionaries and…
- flatten-jsonConverts nested JSON objects into flat key-value dictionaries and…
- flatdictFlattens nested dictionaries into single-level dicts with delimited…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also flatten-dict · flatten-json · jsonable · json-tools-rs · deflate-dict · magicattr · flatdict · dynamodb-json · json-normalize · dm-tree