@peculiar/json-schema
Version:
This package uses ES2015 decorators to simplify JSON schema creation and use
11 lines (10 loc) • 476 B
TypeScript
import { JsonTransform } from "./transform";
import { IEmptyConstructor } from "./types";
export interface IJsonSerializerOptions {
targetSchema?: IEmptyConstructor<any>;
schemaName?: string;
}
export declare class JsonSerializer extends JsonTransform {
static serialize(obj: any, options?: IJsonSerializerOptions, replacer?: (key: string, value: any) => any, space?: string | number): string;
static toJSON(obj: any, options?: IJsonSerializerOptions): any;
}