JSOG encoding for Python
Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.project
.pydevproject
LICENSE.txt
MANIFEST.in
README.md
jsog.py
setup.py
test_jsog.py

README.md

JavaScript Object Graphs with Python

This Python module serializes and deserializes cyclic object graphs in the JSOG format.

Source code

The official repository is (https://github.com/jsog/jsog-python).

Download

Jsog is available in PyPI:

$ pip install jsog

Usage

This code mimics the standard json python package:

import jsog

string = jsog.dumps(cyclicGraph);
cyclicGraph = jsog.loads(string);

It can be used to convert between object graphs directly:

import jsog

jsogStructure = jsog.encode(cyclicGraph);	// has { '@ref': 'ID' } links instead of cycles
cyclicGraph = jsog.decode(jsogStructure);

Author

License

This software is provided under the MIT license