ts-json-simple
Version:
TypeScript package inspired by Java's JSONObject, providing a chainable API for JSON manipulation.
12 lines (11 loc) • 393 B
TypeScript
import type { JSONValue } from "./JSONValue";
export default class JSONArray implements Iterable<any> {
private readonly elements;
constructor(elements?: Array<JSONValue>);
element(key: number, value: JSONValue): this;
add(element: JSONValue): this;
get(index: number): any;
get size(): number;
toJSON(): Array<JSONValue>;
[Symbol.iterator](): Iterator<any>;
}