From 8d0491e47337e9d7cc5aeed7ddb62367785b573a Mon Sep 17 00:00:00 2001 From: Max Kasperowski Date: Fri, 13 Dec 2024 15:02:15 +0100 Subject: [PATCH] add remove method for json adapter (#316) --- .../org/eclipse/elk/graph/json/JsonAdapter.xtend | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/java-additional/org/eclipse/elk/graph/json/JsonAdapter.xtend b/src/java-additional/org/eclipse/elk/graph/json/JsonAdapter.xtend index 181468c..9378be6 100644 --- a/src/java-additional/org/eclipse/elk/graph/json/JsonAdapter.xtend +++ b/src/java-additional/org/eclipse/elk/graph/json/JsonAdapter.xtend @@ -195,6 +195,14 @@ class JsonAdapter { } } + // - - - - - - - - - - - - - - - - - - - + // Remove members from a json object + // - - - - - - - - - - - - - - - - - - - + + def void removeJsonObj(JSONObject o, String element) { + o.put(element, null) + } + // - - - - - - - - - - - - - - - - - - - // Add to a json array // - - - - - - - - - - - - - - - - - - -