Skip to main content

Hypothesis strategy to generate JSON

Project description

hypothesis-json

This Python package provides a Hypothesis strategy to generate Python objects compliant to the JavaScript Object Notation (JSON) Data Interchange Format to uncover unhandled edge cases in your code.

Example

>>> 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) and may be installed using your favorite installer, e.g.:

pip install hypothesis-json

Remarks

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

Licensing

This project may be licensed under the terms of the OSI approved MirOS License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for hypothesis-json, version 1.2.2
Filename, size File type Python version Upload date Hashes
Filename, size hypothesis_json-1.2.2-py3-none-any.whl (11.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page