Metadata-Version: 2.4
Name: vexy-json
Version: 1.5.13
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Rust
Classifier: Typing :: Typed
Classifier: Topic :: File Formats :: JSON
Classifier: Topic :: Software Development :: Interpreters
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Dist: pytest>=7.0 ; extra == 'dev'
Requires-Dist: pytest-benchmark>=4.0 ; extra == 'dev'
Requires-Dist: maturin>=1.0 ; extra == 'dev'
Provides-Extra: dev
Summary: Parse relaxed, configuration-style, and LLM-generated JSON with a fast Rust engine
Keywords: json,json parser,relaxed json,forgiving json,json repair,configuration,llm output,rust,pyo3
Author-email: Adam Twardoch <adam+github@twardoch.com>
License: MIT OR Apache-2.0
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/vexyart/vexy-json/blob/main/CHANGELOG.md
Project-URL: Documentation, https://vexy.dev/vexy-json/
Project-URL: Homepage, https://github.com/vexyart/vexy-json
Project-URL: Issues, https://github.com/vexyart/vexy-json/issues
Project-URL: Repository, https://github.com/vexyart/vexy-json.git

# Vexy JSON for Python

Parse configuration files, hand-edited data, and LLM-generated JSON without
pre-cleaning the text first. Vexy JSON accepts strict JSON plus comments,
trailing commas, unquoted keys, single quotes, implicit containers, newline
separators, and extended number formats. A Rust engine performs the parsing and
returns ordinary Python values.

## Install

```bash
uv add vexy-json
# or: python -m pip install vexy-json
```

The PyPI distribution is named `vexy-json`; Python imports use `vexy_json`.

## Parse

```python
import vexy_json

settings = vexy_json.parse("""
{
  // readable configuration
  environment: 'preview',
  retries: 3,
  regions: ['eu', 'us',],
}
""")

assert settings["environment"] == "preview"
```

Use keyword options when an input boundary must be stricter:

```python
strict = vexy_json.parse_with_options(
    '{"ready": true}',
    allow_comments=False,
    allow_trailing_commas=False,
    allow_unquoted_keys=False,
    allow_single_quotes=False,
    implicit_top_level=False,
    newline_as_comma=False,
    enable_repair=False,
)
```

The package also provides `load`, `loads`, `dump`, `dumps`, `is_valid`, an
NDJSON-capable `StreamingParser`, and optional NumPy and pandas conversion
helpers. It ships inline typing information for editors and type checkers.

## Documentation

Complete guides, option tables, Rust documentation, and troubleshooting are at
[vexy.dev/vexy-json](https://vexy.dev/vexy-json/).

Source and issue tracking live at
[github.com/vexyart/vexy-json](https://github.com/vexyart/vexy-json).

Licensed under MIT or Apache-2.0, at your option.

