json-normalize
Recursively flattens a JSON-like structure into a list of flat dicts.
What it is and what it does
json_normalize takes a nested JSON-like structure—dicts, lists, generators, and other iterables—and flattens it into a sequence of flat dictionaries. Each key in the output is a dot-joined path from the root to a leaf value. The package handles the tricky case of data association: when nested dicts share a common dict ancestor, their data flows together into the same output records; when they share a list ancestor, they remain separate. When multiple independent lists exist in different branches, you can choose how to combine them: chain them sequentially, compute their Cartesian product, or drop problematic branches entirely.
The function is configurable: you can customize the path joiner (dot, arrow, or a callable), freeze certain nodes to prevent recursive normalization below them, drop nodes by name, and control list combination behavior. It accepts generators and lazy iterables as input, making it useful for streaming or memory-constrained scenarios.
Use it for:
- Convert API responses with nested objects and arrays into flat rows suitable for CSV export or database insertion
- Flatten configuration files or metadata structures to extract all leaf values with their full paths
- Denormalize time-series data where measurements contain nested sensor readings and metadata
- Transform hierarchical log entries or event objects into tabular format for analysis
- Prepare nested JSON for pandas DataFrame construction by generating flat dict records
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Recursively flattens nested JSON-like structures (dicts and iterables) into a sequence of flat dictionaries with dot-joined keys, handling multiple lists through configurable combination strategies.
Yes, if you need to flatten nested JSON into flat dicts. The package is stable, dependency-free, and permissively licensed. Dormant maintenance is acceptable for a focused utility with no known vulnerabilities, but verify it handles your specific nesting patterns (especially multiple list branches) before committing to production use.
Install
json-normalize on PyPI
pip
pip install json-normalizeuv
uv add json-normalizepoetry
poetry add json-normalizeInstalling json-normalize
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant (last commit 2024-09-25, 869 days since release), but the package is marked Production/Stable and has received no security reports.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements—suitable for any project type.
Quickstart
from json_normalize import json_normalize
json_like = {"city": "Stockholm", "coords": {"lat": 59.331924, "long": 18.062297}}
result = list(json_normalize(json_like))
# Output: [{'city': 'Stockholm', 'coords.lat': 59.331924, 'coords.long': 18.062297}]
Verify before relying
- Whether dormant maintenance status (869 days since last release) poses a risk for future Python or dependency ecosystem changes
- Performance characteristics on deeply nested or very large JSON structures
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 869 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,227/month — #14,305 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: json_normalize-1.1.0-py3-none-any.whl
Keywords: JSON
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
flatdictFlattens nested dictionaries into single-level…
permissive · top 5,000 on PyPI
mo-dotsProvides null-safe dot-notation access to…
copyleft · top 15,000 on PyPI
dm-treeProvides utilities for working with nested data…
permissive · top 5,000 on PyPI
flatten-jsonConverts nested JSON objects into flat…
permissive · top 5,000 on PyPI
dict-recursive-updateRecursively merges one dictionary into another,…
permissive · top 15,000 on PyPI
json-flattenConverts nested JSON objects into flat…
permissive · top 15,000 on PyPI
lmzProvides convenience functions for mapping,…
copyleft · top 15,000 on PyPI
flatten-dictConverts nested dictionaries into flat…
permissive · top 5,000 on PyPI
awkwardAwkward Array provides NumPy-like operations on…
permissive · top 5,000 on PyPI
databindDatabind deserializes JSON-like nested data…
permissive · top 15,000 on PyPI