@faubulous/mentor-rdf-serializers
    Preparing search index...

    Interface JsonLdSerializerOptions

    JSON-LD specific options.

    interface JsonLdSerializerOptions {
        alignObjects?: boolean;
        alignPredicates?: boolean;
        baseIri?: string;
        blankLinesBetweenSubjects?: boolean;
        blankNodeIdGenerator?: (counter: number) => string;
        blankNodeStyle?: BlankNodeStyle;
        compactArrays?: boolean;
        directiveStyle?: "turtle" | "sparql-lowercase" | "sparql-uppercase";
        embedContext?: boolean;
        emitDirectives?: boolean;
        groupBySubject?: boolean;
        indent?: string;
        inlineCollections?: boolean;
        inlineSingleUseBlankNodes?: boolean;
        jsonIndent?: number;
        lineEnd?: string;
        maxLineWidth?: number;
        objectListStyle?: ObjectListStyle;
        predicateListStyle?: PredicateListStyle;
        prefixes?: Record<string, string>;
        prettyPrint?: boolean;
        relabelBlankNodes?: boolean;
        sort?: SortingOption;
        spaceBeforePunctuation?: boolean;
        useIdShorthand?: boolean;
        useRdfTypeShorthand?: boolean;
        useTypeShorthand?: boolean;
    }

    Hierarchy (View Summary)

    Index
    alignObjects?: boolean

    Whether to align objects in columns (requires alignPredicates). Default: false

    alignPredicates?: boolean

    Whether to align predicates in columns. Default: false

    baseIri?: string

    The base IRI for relative IRI resolution.

    blankLinesBetweenSubjects?: boolean

    Whether to insert blank lines between subjects. Default: true

    blankNodeIdGenerator?: (counter: number) => string

    Custom blank node ID generator. If provided, this function will be called to generate IDs for new blank nodes.

    blankNodeStyle?: BlankNodeStyle

    Blank node formatting style. Default: 'auto'

    compactArrays?: boolean

    Whether to compact arrays with single items. Default: true

    directiveStyle?: "turtle" | "sparql-lowercase" | "sparql-uppercase"

    Controls 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'
    embedContext?: boolean

    Whether to embed

    in the output. Default: true

    emitDirectives?: boolean

    Whether to emit PREFIX/BASE directives in serializer output. Default: true.

    groupBySubject?: boolean

    Whether to group statements by subject (Turtle/TriG style). Default: true for Turtle/TriG, false for N-Triples/N-Quads

    indent?: string

    Indentation string (default: ' ' for 2 spaces).

    inlineCollections?: boolean

    Whether 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

    inlineSingleUseBlankNodes?: boolean

    Whether to serialize single-use blank nodes as local property lists ([ ... ]) when pretty printing.

    This applies only when prettyPrint is true. Default: true

    jsonIndent?: number

    JSON indentation spaces (default: 2).

    lineEnd?: string

    Line ending string (default: '\n').

    maxLineWidth?: number

    Maximum line width before wrapping (0 = no wrapping). Default: 0

    objectListStyle?: ObjectListStyle

    Object list formatting style. Default: 'auto'

    predicateListStyle?: PredicateListStyle

    Predicate list formatting style. Default: 'first-same-line'

    prefixes?: Record<string, string>

    Mapping of prefixes to namespaces for compacting IRIs in the output.

    prettyPrint?: boolean

    Whether to pretty-print the JSON output with newlines and indentation.

    relabelBlankNodes?: boolean

    Whether 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

    Sorting option for quads.

    spaceBeforePunctuation?: boolean

    Whether to insert a space before statement punctuation (;, ,, .) and directive terminators. When false, punctuation hugs the preceding token (e.g. ex:s ex:p ex:o;). Default: true

    useIdShorthand?: boolean

    Whether to use

    shorthand instead of full IRI objects. Default: true

    useRdfTypeShorthand?: boolean

    Whether to use the 'a' shorthand for rdf:type. Default: true for Turtle/TriG/N3, false for N-Triples/N-Quads

    useTypeShorthand?: boolean

    Whether to use