io

Graph Serialization

Traits for reading/writing Statements and Graphs as well as implementations for common file formats.

The following are some well-known formats (see Wikipedia for a description of different serializations), support is indicated in the final column with an R for read support and W for write support. One additional module, dot allows for the creation of GraphViz dot files for a visualization of a graph’s structure.

ModuleNameMIME TypeSpecificationR/W
ntN-Triplesapplication/n-triplesW3CW
nqN-Quadsapplication/n-quadsW3CW
n3N3text/rdf+n3W3C Submission
turtleTurtletext/turtleW3CW
xmlRDF/XMLapplication/rdf+xmlW3C
jsonJSON-LDapplication/ld+jsonW3C
TBDRDFatext/htmlW3C
TBDRDF/JSONapplication/rdf+jsonW3C
TBDTriGapplication/trigW3C
TBDHDT?W3C Submission
TBDBinaryRDFapplication/x-binary-rdfCommunity

Each module will also provide public constants NAME, FILE_EXTENSION, and MIME_TYPE.