Skip to main content
Module

x/cav/mod.ts>unpackJson

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

Unpacks the JSON string into the original value. Any packers used during packing (outside of registered packers and the Cav defaults) need to be provided here as well, or an error may be thrown. This function is a one-liner:

return unpack(JSON.parse(value), packers);

Parameters

value: string
optional
packers: Packers

Returns

unknown