Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 644 Bytes

graph_serialization.md

File metadata and controls

12 lines (10 loc) · 644 Bytes

Graph Marshaling/Unmarshaling

Graph can be marshaled to text or unmarshaled back from text into a graph using the io package. The package provides two simple functions in io.

  • ReadIntoGraph reads triples from a text reader into the provided graph. The expected format is one triple per line, and subject, predicate, and object separated by tabs.
  • WriteGraph writes the triples of the provided graph into a text writer. Each triple is written into a separate line where subject, predicate, and object are separated by tabs.