Skip to content

jsog/jsog-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2e7d823 · Sep 28, 2015

History

14 Commits
Sep 28, 2015
Sep 28, 2015
Sep 28, 2015
Sep 28, 2015
Sep 28, 2015
Sep 28, 2015
Sep 28, 2015
May 28, 2013
Sep 28, 2015
Sep 28, 2015

Repository files navigation

JavaScript Object Graphs with Ruby

This Ruby gem serializes and deserializes cyclic object graphs in the JSOG format.

Source code

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

Download

Jsog is available from rubygems.org:

$ gem install jsog

Usage

This code mimics the standard JSON ruby package:

require 'jsog'

string = JSOG.dump(cyclicGraph);
cyclicGraph = JSOG.parse(string);

It can be used to convert between object graphs directly:

require '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