ts-std-lib
Version:
A standard library for typescript
13 lines (12 loc) • 555 B
TypeScript
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;
}