Metadata-Version: 2.1
Name: hypothesis-json
Version: 1.2.2
Summary: Hypothesis strategy to generate JSON
Home-page: https://github.com/macheins/hypothesis-json
License: UNKNOWN
Author: macheins
Requires-Python: >=3.5,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Hypothesis
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MirOS License (MirOS)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Testing
Requires-Dist: hypothesis (>=3.69,<4.0)
Project-URL: Repository, https://github.com/macheins/hypothesis-json
Description-Content-Type: text/markdown

# hypothesis-json

This Python package provides a [Hypothesis](https://pypi.org/project/hypothesis/) strategy to generate Python objects compliant to the [JavaScript Object Notation (JSON) Data Interchange Format](https://tools.ietf.org/html/rfc8259) to uncover unhandled edge cases in your code.

## Example

```python
>>> from pprint import pprint
>>> from hypothesis_json.strategies import jsons
>>> pprint(jsons().example())
{'': '34.0',
 '-34.0': {'-27566.0': inf,
           '3.402823466e+38': ['11537'],
           '9007199254740992.0': 17857.0,
           'Infinity': '4794727320289625.0',
           'true': False},
 '\x14\U000db833': '-14719'}
```

## Installation

The package is published to the [Python Package Index (PyPI)](https://pypi.org/project/hypothesis-json/) and may be installed using your favorite installer, e.g.:
```sh
pip install hypothesis-json
```

## Remarks

- Generated numbers are guaranteed to be processable as [double-precision floating-point numbers](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)
- The non-standard constants supported by [Python's json module](https://docs.python.org/3/library/json.html) are also generated by default, but may be omitted

## Status & Versioning

Although this is a very young project, it was developed with a strong focus on quality and should be suitable for use in production environments. Versioning of releases will strictly follow the [Semantic Versioning Specification (SemVer)](https://semver.org).

## Licensing

This project may be licensed under the terms of the [OSI](https://opensource.org/licenses/alphabetical) approved [MirOS License](https://www.mirbsd.org/MirOS-Licence.htm).

