mutate
Applies pointer-based mutations to this JsonObject within block, returning a new JsonObject.
The original is unchanged; the result is a freshly constructed JsonObject that reflects every assignment and removal performed inside the DSL block. See KpaStructMutationScope for the available to and remove operations.
Return
A new JsonObject with the mutations applied.
Parameters
A lambda with KpaStructMutationScope as receiver.
Applies pointer-based mutations to this JsonArray within block, returning a new JsonArray.
The original is unchanged; the result is a freshly constructed JsonArray that reflects every assignment and removal performed inside the DSL block. See KpaListMutationScope for the available to and remove operations.
Return
A new JsonArray with the mutations applied.
Parameters
A lambda with KpaListMutationScope as receiver.