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 PatchOperation

One 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.

ParameterTypeKindDefault
pathStringpositional
valueObject?positional

PatchOperation.remove

PatchOperation.remove(String path)

Removes the value at path.

ParameterTypeKindDefault
pathStringpositional

PatchOperation.replace

PatchOperation.replace(String path, Object? value)

Replaces the value at path with value.

ParameterTypeKindDefault
pathStringpositional
valueObject?positional

PatchOperation.copy

PatchOperation.copy({required String from, required String path})

Copies the value at from to path.

ParameterTypeKindDefault
fromStringrequired named
pathStringrequired named

PatchOperation.move

PatchOperation.move({required String from, required String path})

Moves the value at from to path.

ParameterTypeKindDefault
fromStringrequired named
pathStringrequired named

PatchOperation.test

PatchOperation.test(String path, Object? value)

Fails the patch unless the value at path equals value.

ParameterTypeKindDefault
pathStringpositional
valueObject?positional

Methods

PatchOperation.toJson

Map<String, Object?> toJson()

The operation as its JSON Patch object.

Returns Map<String, Object?>.

Last updated on

On this page