It is all about the way tree dialog node structure is represented.

Tooling works with previous_sibling and parent values in dialog node, and a flat list of dialog nodes. This makes it hard to keep nodes linked properly when editing JSON manualy.

In nested children lists format previous_sibling and parent values are simply replaced with children array. See the example:

{
	"dialog_nodes": [
		{
			"conditions": "#joke",
			"output": {"text": "..."},
			"children": [
				{
					"conditions": "#intent1",
					"output": {"text": "..."},
					"children": [ /* ... more nodes ... */]
				},
				{
					"conditions": "true",
					"output": {"text": "..."},
				}
			]
		},
		{
			"conditions": "anything_else",
			"output": {"text": "..."},
		}
	]
}

Note that not even dialog_node field is needed. It is generated during conversion where needed. However you may want to provide dialog_node value when linking nodes with go_to.

Converting workspace formats

Nested children lists can not be uploaded into conversation service. Therefore frequent converting between nested and flat format is needed.

Flat to nested list

node tools/flat2children.js dstFile-flat.json srcFile-children.json

Nested to flat list

node tools/children2flat.js srcFile-children.json dstFile-flat.json

Nested to flat and upload

node tools/children2flatAndPut.js srcFile-children.json dstFile-flat.json

converts and replaces the workspace in conversation service specified in tools/runtimeCredentials.json