Skip to content

Latest commit

 

History

History
38 lines (21 loc) · 961 Bytes

README.md

File metadata and controls

38 lines (21 loc) · 961 Bytes

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/simoneggler/jsog-python) which is a fork of (https://github.com/jsog/jsog-python).

Download

Jsog is available in PyPI:

$ pip install jsog3

Usage

This code mimics the standard json python package:

from jsog3 import jsog

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

It can be used to convert between object graphs directly:

from jsog3 import jsog

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

Authors

License

This software is provided under the MIT license