Comunica
    Preparing search index...

    A comunica JSON Query Result Serialize Actor.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Actor that must be registered in the bus before this actor.

    The bus this actor subscribes to.

    mediaTypeFormats: Record<string, string>

    A record of media types, with media type name as key, and its format IRI as value.

    mediaTypePriorities: Record<string, number>

    A record of media types, with media type name as key, and its priority as value. Priorities are numbers between [0, 1].

    name: string

    The name for this actor.

    {<rdf:subject>}
    
    priorityScale: number | undefined

    A multiplier for media type priorities. This can be used for keeping the original media types in place, but scaling all of their scores with a certain value.

    MAX_CHUNK_LENGTH: 65536 = 65_536

    The length after which a chunk of serialized elements is pushed.

    Methods

    • Create a stream of the given elements as a JSON array. All elements that are available when the stream is read are serialized into a single chunk, which is cheaper than handling every element as a separate chunk.

      Type Parameters

      • T

      Parameters

      • stream: AsyncIterator<T>

        A stream of elements.

      • serialize: (element: T) => string

        Serializes an element into JSON.

      Returns Readable