Expand description
This crate provides traits for reading and writing
Statement
s and Graph
s as well as implementations of these for common representations.
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.
Module | Name | MIME Type | R/W |
---|---|---|---|
nt | RDF 1.1 N-Triples; A line-based syntax for an RDF graph | application/n-triples | R+W |
nq | RDF 1.1 N-Quads; A line-based syntax for RDF datasets | application/n-quads | W |
turtle | RDF 1.1 Turtle; Terse RDF Triple Language | text/turtle | W |
trig | RDF 1.1 TriG; RDF Dataset Language | application/trig | |
xml | RDF 1.1 XML Syntax | application/rdf+xml | W |
json | RDF 1.1 JSON Alternate Serialization | application/rdf+json | W |
n3 | Notation3 (N3): A readable RDF syntax | text/rdf+n3 | W |
TBD | Binary RDF Representation for Publication and Exchange (HDT) | N/A | |
TBD | RDF Binary using Apache Thrift | application/x-binary-rdf | |
TBD | JSON-LD 1.1; A JSON-based Serialization for Linked Data | application/ld+json | |
TBD | RDFa Core 1.1 - Third Edition | text/html |
Each module will also provide public constants NAME
, FILE_EXTENSION
, and MIME_TYPE
.
Modules§
- dot
- Provides for writing a
Graph
instance in the GraphViz dot file format. - json
- Provides for writing a
Graph
instance in the W3C RDF 1.1 JSON Alternate Serialization (RDF/JSON) format. - n3
- Provides for reading and writing a
Graph
instance in the proposed W3C Notation3 (N3), a readable RDF syntax, format. - nq
- Provides for reading and writing a
NamedGraph
instance in the W3C RDF 1.1 N-Quads, a line-based syntax for RDF datasets, format. - nt
- Provides for reading and writing a
Graph
instance in the W3C RDF 1.1 N-Triples, a line-based syntax for an RDF graph format. - trig
- Provides for reading and writing a
Graph
instance in the W3C RDF 1.1 TriG, RDF Dataset Language format. - turtle
- Provides for reading and writing a
Graph
instance in the RDF 1.1 Turtle, Terse RDF Triple Language, format. - xml
- Provides for writing out in the RDF 1.1 XML Syntax format.