kinetex - v1.0.0-rc.1
    Preparing search index...

    Function readJSON

    • Read a response body as JSON with full parsing pipeline.

      Type Parameters

      • T = unknown

      Parameters

      • response: Response

        The fetch Response.

      • options: ResponseParseOptions = {}

        Parse options (content-type check, charset, size limit, signal).

      Returns Promise<T>

      The parsed JSON value.

      If expectedContentType is set and doesn't match.

      If JSON parsing fails.