How to serialize a graph structure?

前端 未结 6 1048
一整个雨季
一整个雨季 2021-02-02 08:11

Flat files and relational databases give us a mechanism to serialize structured data. XML is superb for serializing un-structured tree-like data.

But many problems are b

6条回答
  •  感动是毒
    2021-02-02 09:01

    XML is very verbose. Whenever I do it, I roll my own. Here's an example of a 3 node directed acyclic graph. It's pretty compact and does everything I need it to do:

    0: foo
    1: bar
    2: bat
    ----
    0 1
    0 2
    1 2
    

提交回复
热议问题