top | item 30070804

(no title)

hardillb | 4 years ago

The flows are stored as JSON and there is a setting to save them as prettified to make them more readable (`flowFilePretty: true` in the settings.js which is on by default in recent release).

Also the flow storage is fully plugable (https://nodered.org/docs/api/storage/) so nothing to stop you choosing/implementing a different storage format e.g. YAML https://github.com/natcl/node-red-contrib-yaml-storage

discuss

order

OJFord|4 years ago

But can you actually hand-write it? When I last looked IDs were UUIDs or similar, so you'd have to create a node in the GUI for a start, and even then the structure of it just clearly wasn't designed for manual editing or diffing. 'Storage' sort of sums it up really, doesn't it?

knolleary|4 years ago

Given Node-RED is intended as a low-code programming tool, hand-writing the flow JSON has never really been a requirement - certainly not one I can recall being brought up in the community. It's certainly possible to generate flow JSON via other means as the format is not hugely complicated once you know the format.

It's an array of objects, each representing a 'thing' in the flow. Each object has a unqiue id (which can be any randomly generated value), and other meta data that defines what the object is and what its configuration is.

Given most nodes have been implemented with a graphical UI in mind for configuring the nodes, you'd have to refer to individual nodes to understand what node-specific properties they require.