blixhavn / dojson

Simple pythonic JSON to JSON converter.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DoJSON

.. currentmodule:: dojson

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'))]

About

Simple pythonic JSON to JSON converter.

License:Other


Languages

Language:Python 99.3%Language:XSLT 0.7%Language:Shell 0.0%