Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
function JSONCodec
import { JSONCodec } from "https://deno.land/x/natsws@v1.28.0/src/mod.ts";

Returns a Codec for encoding JavaScript object to JSON and serialize them to an Uint8Array, and conversely, from an Uint8Array to JSON to a JavaScript Object.

Type Parameters

optional
T = unknown

Parameters

optional
reviver: (
this: unknown,
key: string,
value: unknown,
) => unknown