JsonNode
Unpublished development API. This package is under development and is not available as a published release.
Immutable partial JSON tree node with parse status, a projected value, and kind-specific buffers or children.
import type { JsonNode } from '@threadplane/content/json';Declaration
export type JsonNode = JsonNodeBase & ({
readonly kind: 'null';
readonly value: null | undefined;
} | {
readonly kind: 'boolean';
readonly value: boolean | undefined;
} | {
readonly kind: 'number';
readonly value: number | undefined;
readonly buffer: string;
} | {
readonly kind: 'string';
readonly value: string | undefined;
readonly buffer: string;
} | {
readonly kind: 'array';
readonly value: readonly JsonPartialValue[];
readonly children: readonly JsonNode[];
} | {
readonly kind: 'object';
readonly value: Readonly<Record<string, JsonPartialValue>>;
readonly children: Readonly<Record<string, JsonNode>>;
});