Skip to main content
decode: (data: string | string[]) => any = decode

Static decode function

Type Declaration

    • (data: string | string[]): any
    • Decodes JSON string(s) into objects.

      Throws on malformed input, like decodeRegular and decodeNoInfNan and like the JavaScript API’s GPUdb.decode. Returning the undecoded string instead would put a string where every response type declares an object, with nothing to signal it.

      Parameters

      • data: string | string[]

      Returns any