No project description provided
Project description
json_partial_py is a resilient JSON parsing library written in Rust that goes beyond the strict JSON specification. It’s designed to parse not only valid JSON but also "JSON‐like" input that may include common syntax errors, multiple JSON objects, or JSON embedded in markdown code blocks.
This is python bindings for json_partial library (Rust).
Usage:
pip install json_partial_py
from pydantic import BaseModel
from json_partial_py import to_json_string
# Example input: A malformed JSON wrapped in Markdown fences.
MALFORMED_JSON = r"""
```json
{"name": "Bob", "age": 25}
```
"""
# Define a simple Pydantic model that matches the expected JSON structure.
class Person(BaseModel):
name: str
age: int
json_str = to_json_string(MALFORMED_JSON)
person = Person.model_validate_json(json_str)
print(person)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file json_partial_python-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: json_partial_python-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 936.9 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189e0c48b649331c1fea4a443ff0423003b436c988b97857b6ae539e33bc1324
|
|
| MD5 |
5956017f532607657c94193c14fc8b76
|
|
| BLAKE2b-256 |
e9ff6e10127fd0384f6168e3f8ac6401e39e734ac69b7a3246fa7c09f62db3b1
|