Skip to main content
Module

x/cav/mod.ts>serialize

A server framework for Deno
Go to Latest
function serialize
Re-export
import { serialize } from "https://deno.land/x/cav@0.0.21/mod.ts";

Serializes a value recursively until it's JSON-compatible. Serializers can be plugged in to extend the accepted types beyond what Cav supports by default. Referential equality will be preserved whenever the same object or symbol value is encountered more than once. If a value isn't recognized by any of the provided serializers or the default serializers, an error is thrown.

Parameters

value: unknown
optional
serializers: Serializers | null

Returns

unknown