PNJsonPatchOperation

data class PNJsonPatchOperation(val op: String, val path: String, val value: Any? = null, val from: String? = null)

A single JSON Patch (RFC-6902) operation used by pubnub.dataSync.updateEntity.

Constructors

Link copied to clipboard
constructor(op: String, path: String, value: Any? = null, from: String? = null)

Properties

Link copied to clipboard
val from: String?

JSON Pointer to the source location. Required for move/copy.

Link copied to clipboard
val op: String

The operation to perform (e.g. add, remove, replace, move, copy, test). Modeled as a String rather than an enum to stay source-compatible with future values.

Link copied to clipboard

JSON Pointer (RFC-6901) to the target location, e.g. /status or /payload/role.

Link copied to clipboard
val value: Any?

The value to add, replace, or test. Required for add/replace/test.