JsonPatch

object JsonPatch

Minimal RFC 6902 JSON Patch applier. Supports the three load-bearing operations that AG-UI STATE_DELTA emits in practice: add, replace, remove. move, copy, and test are accepted but fall back to replace-like semantics; they can be fleshed out when real-world traffic demands them.

Functions

Link copied to clipboard
fun apply(root: JsonElement, patch: JsonArray): JsonElement

Apply patch (an array of RFC 6902 ops) to root, returning a new JsonElement.