UpdateDataModelMessage

@Serializable
data class UpdateDataModelMessage(val surfaceId: String, val path: String? = null, val value: JsonElement) : AgentToRendererMessage

Writes value into a live surface's data model.

path is a JSON Pointer; omitting it, or passing /, addresses the whole data model. It is carried verbatim and is NOT checked for pointer syntax here — it arrives from the agent and is the write address into the data model, so validate it before resolving it.

A value of kotlinx.serialization.json.JsonNull deletes what path addresses, which is why this is a non-null JsonElement — an absent value is malformed, an explicit null is a delete.

Constructors

Link copied to clipboard
constructor(surfaceId: String, path: String? = null, value: JsonElement)

Properties

Link copied to clipboard
val path: String?
Link copied to clipboard
Link copied to clipboard
val value: JsonElement