An interface that marks implementing classes and objects as serializable with JSON.stringify.
JSON.stringify
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behavior
the type of the value to serialize via JSON.stringify.
Returns a value that represents this object and is also serializable with JSON.stringify.
the value to serialize
export class Queue<T> implements JsonSerializable<T[]> { private readonly items: T[]; toJSON(): T[] { return this.items.slice(0); }}
Generated using TypeDoc
An interface that marks implementing classes and objects as serializable with
JSON.stringify
.See
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#tojson_behavior