@tsed/json-mapper
Version:
Json mapper module for Ts.ED Framework
34 lines (33 loc) • 1.35 kB
TypeScript
import { Type } from "@tsed/core";
import { JsonDeserializerOptions } from "./JsonDeserializerOptions.js";
import { CachedJsonMapper, JsonMapperCompiler } from "./JsonMapperCompiler.js";
export declare class JsonDeserializer extends JsonMapperCompiler<JsonDeserializerOptions> {
/**
* Cached classes by his id
* @protected
*/
protected constructors: Record<string, Type<any>>;
constructor();
map<Model = any>(input: any, options?: JsonDeserializerOptions): Model;
compile(model: Type<any>, groups: false | string[]): CachedJsonMapper<JsonDeserializerOptions>;
eval(mapper: string, { id, groupsId, model }: {
id: string;
model: Type<any>;
groupsId: string;
}): CachedJsonMapper<JsonDeserializerOptions>;
protected newInstanceOf(id: string, obj: any, options: any): any;
protected createMapper(model: Type<any>, id: string, groups: false | string[]): string;
protected alterValue(schemaId: string, value: any, options: JsonDeserializerOptions): any;
private mapDiscriminator;
private mapProperty;
private getPropertyFiller;
private mapOptions;
private mapAdditionalProperties;
private mapObject;
private mapSet;
private mapArray;
private mapMap;
private mapItem;
private alterBeforeDeserialize;
private alterAfterDeserialize;
}