Metadata-Version: 2.1
Name: fjson
Version: 0.1.6
Summary: Python JSON writer with float formatting
Author: Nico Schlömer
Author-email: nico.schloemer@gmail.com
License: The MIT License (MIT)
        
        opyright (c) 2020-2022 Nico Schlömer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/nschloe/fjson
Project-URL: code, https://github.com/nschloe/fjson
Project-URL: issues, https://github.com/nschloe/fjson/issues
Project-URL: funding, https://github.com/sponsors/nschloe
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Programming Language :: Python :: 3.11
Classifier: Topic :: Utilities
Description-Content-Type: text/markdown
License-File: LICENSE.txt

<p align="center">
  <a href="https://github.com/nschloe/fjson"><img alt="fjson" src="https://nschloe.github.io/fjson/logo.svg" width="50%"></a>
  <p align="center">JSON with float formatting.</p>
</p>

[![PyPi Version](https://img.shields.io/pypi/v/fjson.svg?style=flat-square)](https://pypi.org/project/fjson)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/fjson.svg?style=flat-square)](https://pypi.org/pypi/fjson/)
[![GitHub stars](https://img.shields.io/github/stars/nschloe/fjson.svg?style=flat-square&logo=github&label=Stars&logoColor=white)](https://github.com/nschloe/fjson)
[![Downloads](https://pepy.tech/badge/fjson/month?style=flat-square)](https://pepy.tech/project/fjson)
<!--[![PyPi downloads](https://img.shields.io/pypi/dm/fjson.svg?style=flat-square)](https://pypistats.org/packages/fjson)-->

[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/fjson/ci?style=flat-square)](https://github.com/nschloe/fjson/actions?query=workflow%3Aci)
[![codecov](https://img.shields.io/codecov/c/github/nschloe/fjson.svg?style=flat-square)](https://codecov.io/gh/nschloe/fjson)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

The [json](https://docs.python.org/3/library/json.html) module in the Python standard
library does not allow you to specify the format in which `float`s are written out the
file. This module adds the `float_format` parameter.

```python
import math
import fjson


data = {"a": 1, "b": math.pi}
string = fjson.dumps(data, float_format=".6e", indent=2, separators=(", ", ": "))
print(string)
```

<!--pytest-codeblocks:expected-output-->

```json
{
  "a": 1,
  "b": 3.141593e+00
}
```

### License

fjson is published under the [MIT license](https://en.wikipedia.org/wiki/MIT_License).
