json-numpy
JSON encoding/decoding for Numpy arrays and scalars
Decision gist · record as of 2026-08-14
Yes. The package solves a genuine gap in Python's standard library with low install friction, permissive licensing, and stable maintenance. It is well-suited for any workflow that needs to serialize NumPy data to JSON. The three usage patterns offer flexibility for different integration scenarios.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with a single runtime dependency on numpy.
- The package is marked as Production/Stable and has been actively maintained, with a recent release on 2025-06-30.
License · maintenance · safety
permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
last release 2025-06-30 (410 days) · last repo commit 2025-06-30 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 387,754 downloads/mo, #7,042 on PyPI
Alternatives
Verify before relying
import numpy as np
import json_numpy
arr = np.array([0, 1, 2])
encoded = json_numpy.dumps(arr)
decoded = json_numpy.loads(encoded)- Performance characteristics and memory overhead compared to alternative serialization formats for large arrays
- Compatibility with all NumPy scalar types and complex nested data structures
What it is and what it does
json-numpy extends Python's built-in json module to handle NumPy arrays and scalars, which the standard library cannot serialize natively. It provides three usage patterns: a drop-in replacement for json functions, explicit encoder/decoder functions for use with the standard json module, or monkey-patching to modify json behavior globally. The package preserves array shape, dtype, and values through the encode-decode cycle without data loss.
The package depends only on numpy and supports Python 3.8 through 3.13. It is classified as Production/Stable and has been maintained since its initial release in 2021. The implementation wraps the standard json module's methods, making it straightforward to integrate into existing codebases that already work with NumPy data.
Use it for
- Serialize NumPy arrays to JSON for REST API responses or file storage
- Deserialize JSON data back into NumPy arrays in data processing pipelines
- Enable JSON-based inter-process communication when one process uses NumPy and another expects JSON
- Store numerical computation results as JSON while preserving array structure and dtype information
- Monkey-patch json in third-party libraries to transparently handle NumPy objects without code modification
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a genuine gap in Python's standard library with low install friction, permissive licensing, and stable maintenance. It is well-suited for any workflow that needs to serialize NumPy data to JSON. The three usage patterns offer flexibility for different integration scenarios.
Install
json-numpy on PyPI
Before you install
Low friction installation with a single runtime dependency on numpy. The package is marked as Production/Stable and has been actively maintained, with a recent release on 2025-06-30.
License in practice
MIT License permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and proprietary projects.
Quickstart
import numpy as np
import json_numpy
arr = np.array([0, 1, 2])
encoded = json_numpy.dumps(arr)
decoded = json_numpy.loads(encoded)
Verify before relying
- Performance characteristics and memory overhead compared to alternative serialization formats for large arrays
- Compatibility with all NumPy scalar types and complex nested data structures
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Aging 410 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 387,754 / month, #7,042 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Utilities |
Evidence: json_numpy-2.1.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 › “numpy json serialization”
- json-numpyProvides lossless JSON encoding and decoding for NumPy arrays and…
- orjsonorjson is a fast JSON serialization and deserialization library that…
- jsonpicklejsonpickle converts complex Python objects to and from JSON, enabling…
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 jsonconversion · numpyencoder · json-tricks · simplejson · flask-orjson · msgpack-numpy · msgpack-numpy-opentensor · asn1 · py-ubjson · jsonpickle