Save json files with indentation
Would it be possible to save JSON files with indent=2
?
Currently we have:
{"graph":{"id":"0","label":"New-Graph","input_nodes":[{"id":"In_0","node":"Node_0","sub_node":"","uiProps":{"position":{"x":135,"y":240}}}],"output_nodes":[{"id":"Out_0","node":"Node_1","sub_node":"","uiProps":{"position":{"x":975,"y":255}}}],"uiProps":{}},"nodes":[{"id":"Node_1","label":"ewokscore.scripttask.ScriptExecutorTask","task_type":"method","task_identifier":"ewokscore.scripttask.ScriptExecutorTask","inputs_complete":false,"task_generator":"","default_inputs":[],"uiProps":{"label":"ewokscore.scripttask.ScriptExecutorTask","type":"internal","icon":"orange2","position":{"x":690,"y":270}}},{"id":"Node_0","label":"ewokscore.scripttask.ScriptExecutorTask","task_type":"method","task_identifier":"ewokscore.scripttask.ScriptExecutorTask","inputs_complete":false,"task_generator":"","default_inputs":[{"id":"-","name":"-","value":"-"}],"uiProps":{"label":"ewokscore.scripttask.ScriptExecutorTask","type":"internal","icon":"orange2","position":{"x":375,"y":255}}}],"links":[{"source":"Node_0","target":"Node_1","data_mapping":[],"conditions":"","sub_target":"tl","sub_source":"sr","map_all_data":false,"uiProps":{"label":"link_1","type":"default","arrowHeadType":"arrow","labelStyle":{"fill":"blue","fontWeight":500,"fontSize":14},"sourceHandle":"sr","targetHandle":"tl"}}]}
which would become
{
"graph": {
"id": "0",
"label": "New-Graph",
"input_nodes": [
{
"id": "In_0",
"node": "Node_0",
"sub_node": "",
"uiProps": {
"position": {
"x": 135,
"y": 240
}
}
}
],
"output_nodes": [
{
"id": "Out_0",
"node": "Node_1",
"sub_node": "",
"uiProps": {
"position": {
"x": 975,
"y": 255
}
}
}
],
"uiProps": {}
},
"nodes": [
{
"id": "Node_1",
"label": "ewokscore.scripttask.ScriptExecutorTask",
"task_type": "method",
"task_identifier": "ewokscore.scripttask.ScriptExecutorTask",
"inputs_complete": false,
"task_generator": "",
"default_inputs": [],
"uiProps": {
"label": "ewokscore.scripttask.ScriptExecutorTask",
"type": "internal",
"icon": "orange2",
"position": {
"x": 690,
"y": 270
}
}
},
{
"id": "Node_0",
"label": "ewokscore.scripttask.ScriptExecutorTask",
"task_type": "method",
"task_identifier": "ewokscore.scripttask.ScriptExecutorTask",
"inputs_complete": false,
"task_generator": "",
"default_inputs": [
{
"id": "-",
"name": "-",
"value": "-"
}
],
"uiProps": {
"label": "ewokscore.scripttask.ScriptExecutorTask",
"type": "internal",
"icon": "orange2",
"position": {
"x": 375,
"y": 255
}
}
}
],
"links": [
{
"source": "Node_0",
"target": "Node_1",
"data_mapping": [],
"conditions": "",
"sub_target": "tl",
"sub_source": "sr",
"map_all_data": false,
"uiProps": {
"label": "link_1",
"type": "default",
"arrowHeadType": "arrow",
"labelStyle": {
"fill": "blue",
"fontWeight": 500,
"fontSize": 14
},
"sourceHandle": "sr",
"targetHandle": "tl"
}
}
]
}