Skip to content

Function: schemaToJSON() ​

ts
function schemaToJSON(node): JSONSchemaNode;

Experimental

Convert a schema node to JSON. Leaves keep their valType and constraints; containers become { role: 'object', ...meta, <children> } and item arrays { role: 'items', itemName, items }, mirroring Plotly's plot-schema layout so existing tooling can read it.

Parameters ​

ParameterType
nodeSchemaNode

Returns ​

JSONSchemaNode

Released under the MIT License.