Closed sbadulin closed 5 years ago
JSON contains only presented nodes and connections between them, all other info (inputs/outputs/controls) are programmable in general.
For example, forms on many sites are programmable, bacause they have their own behaviour and logic. Sometimes a form factory based on JSON data is used.
You can create something like nodes generator based on JSON, but it will not be so flexible
Is the issue still actual?
My goal is to recreate nodes with their connections in the editor from the JSON file. JSON structure:
id: 'demo@0.1.0', nodes: { '1': { id: 1, name: 'MyNode', data: { title: 'Some title' }, inputs: { num1: { connections: [] } }, outputs: { num: { connections: [{ node: 2, input: 'num1' }] }, }, position: [0, 0], }
In builder method I have everything from a 'data' object, but no inputs or outputs. Seems like it is was an intentional decision, but how to generate inputs then?