JSON Canvas Spec

Version 1.0 — 2024-03-11

Top level

The top level of JSON Canvas contains two arrays:

Nodes

Nodes are objects within the canvas. Nodes may be text, files, links, or groups.

Nodes are placed in the array in ascending order by z-index. The first node in the array should be displayed below all other nodes, and the last node in the array should be displayed on top of all other nodes.

Generic node

All nodes include the following attributes:

Text type nodes

Text type nodes store text. Along with generic node attributes, text nodes include the following attribute:

File type nodes

File type nodes reference other files or attachments, such as images, videos, etc. Along with generic node attributes, file nodes include the following attributes:

Link type nodes reference a URL. Along with generic node attributes, link nodes include the following attribute:

Group type nodes

Group type nodes are used as a visual container for nodes within it. Along with generic node attributes, group nodes include the following attributes:

Edges

Edges are lines that connect one node to another.

Color

The canvasColor type is used to encode color data for nodes and edges. Colors attributes expect a string. Colors can be specified in hex format e.g. "#FF0000", or using one of the preset colors, e.g. "1" for red. Six preset colors exist, mapped to the following numbers:

Specific values for the preset colors are intentionally not defined so that applications can tailor the presets to their specific brand colors or color scheme.