UNPKG

ts-std-lib

Version:
13 lines (12 loc) 555 B
import { JsonSerializable, JsonSerializableConstructor } from './JsonSerializable'; import { Reviver, Replacer } from './Json'; /** * Json converter to interchange JSON and objects using a serializer */ export declare class JsonConverter<T extends JsonSerializable> { private readonly _reviver?; private readonly _replacer?; constructor(_reviver?: Reviver<T> | undefined, _replacer?: Replacer<T> | undefined); parse(serializable: JsonSerializableConstructor, jsonString: string): T; stringify(serializable: T): string; }