let rec to_yojson t : Yojson.Basic.json =
let fields =
List.concat [
List.map t.sub_tree_arguments ~f:(fun (k, v) -> k, to_yojson v);
List.map t.string_arguments ~f:(fun (k, v) -> k, `String v);
t.json_arguments;
]
in
`Assoc (("node-name", `String t.name) :: fields)