An entity's subtree as a nested JSON object: structure only, every entity and sub-entity included, and the way to discover their ids. Key characteristics are folded into a compact description built from whatever the entity carries; use node ls for exact property values. The root is level 0, so --depth 1 yields the root plus its immediate children.
[id]: root entity id (optional; omitted = one tree per top-level node, mirroringls)--depth <N>: max depth, non-negative integer (optional; default3,0= full subtree)
JSON Lines, one nested object per root; category arrays are omitted when empty:
NodeTree = NodeRef & {
description: string; // e.g. "hidden; size: 200x300; text: Hello World"
children?: NodeTree[]; // child nodes (masks listed separately)
masks?: NodeTree[];
paints?: NodeTree[]; // fills
strokes?: NodeTree[];
shadows?: NodeTree[];
effects?: NodeTree[];
colorStops?: NodeTree[]; // on gradient paints
textRanges?: NodeTree[]; // on text nodes
keyframeTracks?: NodeTree[]; // keyframes nest beneath their track
keyframes?: NodeTree[];
animations?: NodeTree[];
}