Skip to main content

DoJSON is a simple Pythonic JSON to JSON converter.

Project description

https://github.com/inveniosoftware/dojson/workflows/CI/badge.svg https://img.shields.io/coveralls/inveniosoftware/dojson.svg https://img.shields.io/github/tag/inveniosoftware/dojson.svg https://img.shields.io/pypi/dm/dojson.svg https://img.shields.io/github/license/inveniosoftware/dojson.svg

About

DoJSON is a simple Pythonic JSON to JSON converter.

Installation

DoJSON is on PyPI so all you need is:

$ pip install dojson

Documentation

Documentation is readable at https://dojson.readthedocs.io/ or it can be built using Sphinx:

$ pip install dojson[docs]
$ python setup.py build_sphinx

Testing

Running the test suite is as simple as:

$ python setup.py test

Example

A simple example on how to convert MARCXML to JSON:

from dojson.contrib.marc21.utils import create_record, split_stream
from dojson.contrib.marc21 import marc21
[marc21.do(create_record(data)) for data in split_stream(open('/tmp/data.xml', 'r'))]

Project details


Download files

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

Source Distribution

dojson-1.5.0.tar.gz (305.2 kB view hashes)

Uploaded Source

Built Distribution

dojson-1.5.0-py2.py3-none-any.whl (252.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page