Metadata-Version: 2.1
Name: sb-json-tools
Version: 0.10.1
Summary: Tools for working with JSON files.
Author-Email: =?utf-8?q?Spr=C3=A5kbanken_at_the_University_of_Gothenburg?= <sb-info@svenska.gu.se>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
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 :: Implementation :: CPython
Classifier: Topic :: Utilities
Project-URL: Bug tracker, https://github.com/spraakbanken/python-json-tools/issues
Project-URL: Repository, https://github.com/spraakbanken/python-json-tools
Project-URL: Homepage, https://github.com/spraakbanken/python-json-tools
Requires-Python: >=3.9
Requires-Dist: fastjsonschema>=2.19.1
Requires-Dist: typer>=0.12.3
Requires-Dist: json-arrays>=0.14.1
Requires-Dist: bump-my-version>=0.21.1; extra == "release"
Provides-Extra: release
Description-Content-Type: text/markdown

# python-json-tools

[![Build Status](https://travis-ci.org/spraakbanken/python-json-tools.svg?branch=master)](https://travis-ci.org/spraakbanken/python-json-tools)
[![codecov](https://codecov.io/gh/spraakbanken/python-json-tools/branch/master/graph/badge.svg)](https://codecov.io/gh/spraakbanken/python-json-tools)
[![Build Status](https://github.com/spraakbanken/python-json-tools/workflows/Build/badge.svg)](https://github.com/spraakbanken/python-json-tools/actions)
[![PyPI status](https://badge.fury.io/py/sb-json-tools.svg)](https://pypi.org/project/sb-json-tools/)

Tools for working with json (especially) json-arrays.

Uses `orjson` or `ujson` if present, otherwise standard `json`.

## Usage

### Installation

```
pip install sb-json-tools
```

## json-val (`lib: sb_json_tools.jt_val`)

Allows you to validate iterables of json-objects
according to [json-schema](https://wwww.json-schema.org)

Regular and async functions.

## json-diff (`lib: sb_json_tools.jsondiff`)

Allows you to compare two json-objects and get a report
how they differ, if they do.

## json-val

Command-line tool to validate a json-file with a schema [json-schema](http://json-schema.org).

# Development

After cloning the repo, just run

```
$ make test
```

to setup a virtual environment,
install dev dependencies
and run the unit tests.

_Note:_ If you run the command in a activated virtual environment,
that environment is used instead.
