| 36 | } |
| 37 | |
| 38 | NodeParameter jsonToNodeParameter(Json const& json) { |
| 39 | NodeParameterType type = NodeParameterTypeNames.getLeft(json.getString("type")); |
| 40 | if (auto key = json.optString("key")) |
| 41 | return {type, *key}; |
| 42 | else |
| 43 | return {type, json.opt("value").value(Json())}; |
| 44 | } |
| 45 | |
| 46 | Json nodeOutputToJson(NodeOutput const& output) { |
| 47 | return JsonObject { |