Skip to main content
Module

x/ts_serialize/mod.ts>polymorphicClassFromJSON

A zero dependency library for serializing data
Latest
function polymorphicClassFromJSON
import { polymorphicClassFromJSON } from "https://deno.land/x/ts_serialize@v2.0.3/mod.ts";

Uses either the polymorphic resolver or the polymorphic switch resolver to determine the appropriate class, then deserialize the input using Serializable#fromJSON, returning the result

Parameters

classPrototype: unknown & { prototype: T; }
json: string | JSONObject