Hi! How do I merge two JsonElement objects into on...
# getting-started
n
Hi! How do I merge two JsonElement objects into one? I have
{"name": "Foo"}
and
{"age": 42}
and want to get
{"name": "Foo", "age": 42}
object.
p
JsonElement from what lib?
kotlinx-serialization
JsonElements implement
Map<String, JsonElement>
, so you can just create a new
JsonElement(firstJson + secondJson)
245 Views