NARU API
    Preparing search index...

    Interface StreamedJsonDocument

    A compiled JSON document that is produced on demand instead of held.

    The compiler needs the document's digest and byte length for its build report before the packager writes the file, and a real-large federation exceeds the runtime's maximum string length, so the document cannot be the string it used to be. It is a recipe: measured once, written again on request, never resident.

    interface StreamedJsonDocument {
        bytes: number;
        sha256: string;
        text(): string;
        write(sink: JsonByteSink): void;
    }
    Index
    bytes: number

    UTF-8 bytes of the whole document, including its trailing newline.

    sha256: string
    • The whole document as one string. Only for tests and documents already known to be small: this is precisely the allocation streaming avoids, and it throws for a document past the runtime's maximum string length.

      Returns string