Metadata-Version: 2.1
Name: json-with-comments
Version: 1.1.1
Summary: JSON with Comments for Python
Home-page: https://github.com/n-takumasa/json-with-comments
License: MIT
Author: Takumasa Nakamura
Author-email: n.takumasa@gmail.com
Requires-Python: >=3.7,<3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: tomli (>=2.0.1,<3.0.0); python_version < "3.11"
Project-URL: Repository, https://github.com/n-takumasa/json-with-comments
Description-Content-Type: text/markdown

# JSON with Comments for Python
[![pypi version](https://img.shields.io/pypi/v/json-with-comments.svg)](https://pypi.python.org/project/json-with-comments)
[![Python package](https://github.com/n-takumasa/json-with-comments/actions/workflows/python-package.yml/badge.svg)](https://github.com/n-takumasa/json-with-comments/actions/workflows/python-package.yml)
[![Python Versions](https://img.shields.io/pypi/pyversions/json-with-comments.svg)](https://pypi.org/project/json-with-comments/)

## Features
* Remove single line (`//`) and block comments (`/* */`)
* Remove trailing commas from arrays and objects

## Usage

```sh
pip install json-with-comments
```

```py
>>> import jsonc
>>> jsonc.loads("{// comment \n}")
{}
>>> jsonc.loads("{/* comment */}")
{}
>>> jsonc.loads('{"spam": "ham // egg" /* comment */}')
{'spam': 'ham // egg'}
>>> jsonc.loads('{"spam": /* comment */"ham /* egg */"}')
{'spam': 'ham /* egg */'}
```
And just like `json` module

