dave08
01/17/2023, 1:07 PMMap<String, JsonObject> is there any way to easily modify one of the entry's value in the JsonObject ?dave08
01/17/2023, 1:20 PMMutableJsonObject...? But maybe a more efficient plus operator implementation to merge two JsonObjects?Desmond van der Meer
01/17/2023, 1:23 PMJsonObject implements Map and is just a wrapper around a Map. So you could do something like
val merged = JsonObject(previousJsonObject + mapOf("key" to JsonPrimitive("value")))Desmond van der Meer
01/17/2023, 1:23 PMpreviousJsonObject.toMutableMap() , then modify that map and finally create a new JsonObject again that wraps the mutable map.ephemient
01/17/2023, 1:26 PMMap.plus(Pair) overloaddave08
01/17/2023, 1:27 PMAdam S
01/17/2023, 2:16 PM