This Python module serializes and deserializes cyclic object graphs in the JSOG format.
The official repository is (https://github.com/jsog/jsog-python).
Jsog is available in PyPI:
$ pip install jsog
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);
- Jeff Schnitzer (jeff@infohazard.org)
This software is provided under the MIT license