Created
August 7, 2021 06:24
-
-
Save chamithchathuka/9cda56b7110b29bb3df6fa279edd2aa4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void deepDive(JsonObject members) { | |
| for (Map.Entry<String, JsonElement> entry : members.entrySet()) { | |
| System.out.println("deepDive"); | |
| if (entry.getValue().isJsonArray()) { | |
| JsonArray asJsonArray = entry.getValue().getAsJsonArray(); | |
| asJsonArray.forEach(jsonElement -> { | |
| deepDive(jsonElement.getAsJsonObject()); | |
| }); | |
| } else if (entry.getValue().isJsonObject()) { | |
| deepDive(entry.getValue().getAsJsonObject()); | |
| } else { | |
| System.out.println(entry.getKey() + "=" + entry.getValue()); | |
| if (!entry.getValue().isJsonNull()) { | |
| if (entry.getValue().getAsString().startsWith("${")) { | |
| System.out.println("variable"); | |
| System.out.println(entry.getKey() + "=" + entry.getValue()); | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment