serialize
@tsed/json-mapper
Usage
typescript
import { serialize } from "@tsed/json-mapper";Overview
ts
function serialize(input: any, options?: JsonSerializerOptions): any;Description
Serialize any value using the shared JsonSerializer instance. Respects schema metadata, hooks, aliases, and registered custom mappers.
Example
ts
import {serialize} from "@tsed/json-mapper";
const payload = serialize(model, {type: UserModel, useAlias: true});