OptionalalignWhether to align objects in columns (requires alignPredicates). Default: false
OptionalalignWhether to align predicates in columns. Default: false
OptionalbaseThe base IRI for relative IRI resolution.
OptionalblankWhether to insert blank lines between subjects. Default: true
OptionalblankCustom blank node ID generator. If provided, this function will be called to generate IDs for new blank nodes.
OptionalblankBlank node formatting style. Default: 'auto'
OptionaldirectiveControls the style used for prefix and base directives.
'turtle': Turtle-style (@prefix ex: <…> . / @base <…> .)'sparql-lowercase': SPARQL-style lowercase (prefix ex: <…> / base <…>)'sparql-uppercase': SPARQL-style uppercase (PREFIX ex: <…> / BASE <…>)
Default: 'sparql-uppercase'OptionalemitWhether to emit PREFIX/BASE directives in serializer output.
Default: true.
OptionalgroupWhether to group statements by subject (Turtle/TriG style). Default: true for Turtle/TriG, false for N-Triples/N-Quads
OptionalindentIndentation string (default: ' ' for 2 spaces).
OptionalinlineWhether to serialize well-formed RDF lists (rdf:first/rdf:rest/rdf:nil
chains) using collection syntax (( ... )) when pretty printing.
Malformed, shared or otherwise ambiguous lists fall back to blank node
serialization so that no triples are ever dropped.
This applies only when prettyPrint is true.
Default: true
OptionalinlineWhether to serialize single-use blank nodes as local property lists
([ ... ]) when pretty printing.
This applies only when prettyPrint is true.
Default: true
OptionallineLine ending string (default: '\n').
OptionalmaxMaximum line width before wrapping (0 = no wrapping). Default: 0
OptionalobjectObject list formatting style. Default: 'auto'
OptionalpredicatePredicate list formatting style. Default: 'first-same-line'
OptionalprefixesPrefix mappings for compact IRI serialization. Maps prefix names to namespace IRIs.
OptionalprettyWhether to use pretty printing with indentation and line breaks. Default: true
OptionalrelabelWhether to rename all blank nodes in first-appearance order using the
blankNodeIdGenerator before serializing. Useful for exports where
source blank node labels carry parser-internal prefixes (e.g.
_:13xf400_b0) that would otherwise leak into the output.
Default: false
OptionalsortSorting option for quads.
OptionalspaceAdd a space before punctuation (. and ;). Default: false.
OptionaluseWhether to use the 'a' shorthand for rdf:type. Default: true for Turtle/TriG/N3, false for N-Triples/N-Quads
Options common to all token-based formatters.