Function rdf_canon::canon::serialize

source ·
pub fn serialize(dataset: &Dataset) -> String
Expand description

5. Serialization The serialized canonical form of a canonicalized dataset is an N-Quads document [N-QUADS] created by representing each quad from the canonicalized dataset in canonical n-quads form, sorting them into code point order, and concatenating them. (Note that each canonical N-Quads statement ends with a new line, so no additional separators are needed in the concatenation.) The resulting document has a media type of application/n-quads, as described in C. N-Quads Internet Media Type, File Extension and Macintosh File Type of [N-QUADS].

When serializing quads in canonical n-quads form, components which are blank nodes MUST be serialized using the canonical label associated with each blank node from the issued identifiers map component of the canonicalized dataset.