Patch operation
Generated reference for ovok_sdk: patch operation.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.23+d339d81
PatchOperation
class PatchOperationOne JSON Patch (RFC 6902) operation; value is sent even when it is null.
Constructors
PatchOperation.add
PatchOperation.add(String path, Object? value)Adds value at path.
| Parameter | Type | Kind | Default |
|---|---|---|---|
path | String | positional | |
value | Object? | positional |
PatchOperation.remove
PatchOperation.remove(String path)Removes the value at path.
| Parameter | Type | Kind | Default |
|---|---|---|---|
path | String | positional |
PatchOperation.replace
PatchOperation.replace(String path, Object? value)Replaces the value at path with value.
| Parameter | Type | Kind | Default |
|---|---|---|---|
path | String | positional | |
value | Object? | positional |
PatchOperation.copy
PatchOperation.copy({required String from, required String path})Copies the value at from to path.
| Parameter | Type | Kind | Default |
|---|---|---|---|
from | String | required named | |
path | String | required named |
PatchOperation.move
PatchOperation.move({required String from, required String path})Moves the value at from to path.
| Parameter | Type | Kind | Default |
|---|---|---|---|
from | String | required named | |
path | String | required named |
PatchOperation.test
PatchOperation.test(String path, Object? value)Fails the patch unless the value at path equals value.
| Parameter | Type | Kind | Default |
|---|---|---|---|
path | String | positional | |
value | Object? | positional |
Methods
PatchOperation.toJson
Map<String, Object?> toJson()The operation as its JSON Patch object.
Returns Map<String, Object?>.
Last updated on