Metadata-Version: 2.4
Name: json_partial_python
Version: 0.1.0
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Keywords: structured outputs,agents,llm
Author: Abhishek Tripathi <abhishek.tripathi456@gmail.com
Author-email: Abhishek Tripathi <abhishek.tripathi456@gmail.com>
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/TwistingTwists/json_partial
Project-URL: Source, https://github.com/TwistingTwists/json_partial

`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: 

```python
pip install json_partial_py
```

<pre>
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)

</pre>
