diff --git a/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonAdapter.xtend b/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonAdapter.xtend index dd2e145c5d..581a1a5876 100644 --- a/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonAdapter.xtend +++ b/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonAdapter.xtend @@ -186,6 +186,14 @@ final class JsonAdapter { } } + // - - - - - - - - - - - - - - - - - - - + // Remove members from a json object + // - - - - - - - - - - - - - - - - - - - + + def void removeJsonObj(JsonObject o, String element) { + o.remove(element) + } + // - - - - - - - - - - - - - - - - - - - // Add to a json array // - - - - - - - - - - - - - - - - - - - diff --git a/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonImporter.xtend b/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonImporter.xtend index 7990e0f7ff..94286d2f29 100644 --- a/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonImporter.xtend +++ b/plugins/org.eclipse.elk.graph.json/src/org/eclipse/elk/graph/json/JsonImporter.xtend @@ -627,6 +627,7 @@ final class JsonImporter { } ] + jsonObj.removeJsonObj("sections") jsonObj.addJsonObj("sections", sections) }