@tabula/ui-json-view
Version:
Allows to view JSON in interactive way
18 lines (17 loc) • 397 B
TypeScript
import { JsonValue, Line } from '../../../types';
export type JsonPath = Array<number | string>;
export type LineItem = {
next?: Item;
isLine: true;
line: Line;
};
export type ValueItem = {
next?: Item;
isLine: false;
jsonPath: JsonPath;
level: number;
path: string;
property?: number | string;
value: JsonValue;
};
export type Item = LineItem | ValueItem;