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

    Class TokenSerializer

    Serializes RDF content directly from parser tokens, preserving source information.

    This approach is useful for:

    • Formatting while preserving comments
    • Maintaining blank node ID assignments from parsing
    • Partial document serialization
    • Building source maps for debugging
    Index

    Constructors

    Methods

    • Serializes a partial selection of tokens. Useful for formatting a selected region of a document.

      Parameters

      • tokens: IToken[]

        Tokens from the full document

      • startOffset: number

        Start offset of the selection

      • endOffset: number

        End offset of the selection

      • Optionaloptions: TokenSerializerOptions

        Serialization options

      Returns SerializationResult