GraphStream Users

Archives de la liste Aide


Re: Serialization of Graph


Chronologique Discussions 
  • From: guilhelm savin <guilhelm.savin AT gmail.com>
  • To: graphstream-users AT litislab.fr, Jim McDonald <Jim AT mcdee.net>
  • Subject: Re: Serialization of Graph
  • Date: Wed, 20 May 2015 11:57:54 +0000

Hi Jim,

And welcome to GraphStream.

Not sure to understand where is the problem ?
I am using this code : https://gist.github.com/gsavin/f2ecbc3cbd255f4d9262 to convert a DGS file to JSON.

Cheers;
G.

Le mer. 20 mai 2015 à 13:50, Jim McDonald <Jim AT mcdee.net> a écrit :
Hi,
    I've just started using GraphStream and one of my requirements is to
be able to serialize and deserialize graphs for storage in a database.

    Ideally I'd like to serialize the graph as JSON through Jackson but
I can't just pass the object as-is to Jackson because any loops in the
graph will cause Jackson to fail to serialize it.  The next best
solution is to write custom serializers and deserializers which will
convert the graph to/from a suitable format.

I know that there are various sinks and sources available, but I'm
unsure of which one is best to use.  I'd want a compact plain-text
serialization of the graph which allows me to read and write the entire
graph to and from a String.  Are there any suggestions on the best
format to use, and how to work with strings rather than files when
serializing and deserializing?

    Thanks in advance.

Cheers,
Jim.



Archives gérées par MHonArc 2.6.16.

Top of page