json2onnx
Converts a JSON file to an ONNX file.
What it is and what it does
json2onnx is a lightweight utility that transforms JSON representations into ONNX model files. It provides both a command-line interface and a Python API, accepting input as either a JSON file path or a dictionary, and returning an ONNX ModelProto object that can be saved to disk or used programmatically.
The package is designed for developers working with ONNX models who need to serialize or reconstruct models from JSON format. It has no runtime dependencies, making it straightforward to integrate. However, the project has been dormant for over a year, so users should verify compatibility with their current ONNX and Python versions before relying on it for production workflows.
Use it for:
- Reconstruct ONNX models from JSON representations stored in databases or configuration files.
- Convert JSON-based model definitions into standard ONNX format for inference engines.
- Programmatically generate ONNX models by building JSON dictionaries and converting them.
- Integrate JSON model specifications into automated machine learning pipelines.
- Export model metadata or architecture from JSON to ONNX for compatibility with ONNX tooling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts JSON files to ONNX model format, accepting either a JSON file path or a dictionary and returning an ONNX ModelProto object.
Yes, if you need JSON-to-ONNX conversion and can verify compatibility with your ONNX version. The package has low install friction, no runtime dependencies, and a permissive MIT License. However, dormant maintenance (last update 1077 days ago) means you should test thoroughly before production use and be prepared to fork or find alternatives if issues arise.
Install
json2onnx on PyPI
pip
pip install json2onnxuv
uv add json2onnxpoetry
poetry add json2onnxInstalling json2onnx
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 1077 days ago and the repository shows no recent activity, though it remains unarchived.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions, making it suitable for both open and closed-source projects.
Quickstart
pip install json2onnx
from json2onnx import convert
onnx_graph = convert(
input_json_path="model.json",
output_onnx_file_path="model.onnx"
)
Verify before relying
- What JSON schema or structure is expected as input—whether it must conform to a specific ONNX JSON representation or a custom format.
- Whether the package handles complex ONNX graphs or is limited to simpler model structures.
- Current compatibility with recent ONNX versions, given the dormant maintenance status.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,077 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,898/month — #14,121 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: json2onnx-2.0.3-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
onnx2jsonConverts ONNX model files to JSON format,…
permissive · top 15,000 on PyPI
sed4onnxEncodes and decodes Base64-formatted constant…
permissive · top 15,000 on PyPI
sng4onnxAutomatically generates and assigns operation…
permissive · top 15,000 on PyPI
soc4onnxChanges the opset version of an ONNX model…
permissive · top 15,000 on PyPI
ssi4onnxInfers and fills missing tensor shape…
permissive · top 15,000 on PyPI
sde4onnxRemoves embedded doc_strings from ONNX model…
permissive · top 15,000 on PyPI
simple-onnx-processing-toolsA collection of command-line tools for…
permissive · top 15,000 on PyPI
sne4onnxExtracts subgraphs from ONNX model files by…
permissive · top 15,000 on PyPI
sbi4onnxModifies ONNX model files to initialize or…
permissive · top 15,000 on PyPI
sod4onnxsod4onnx removes specified output operations…
permissive · top 15,000 on PyPI