public final class OmitArrayOptionalOperation extends PathValueOperation
omitArray?
operation.
The operation will remove all the items equivalent to value
from the array at path
.
The operation will remove the parent node if applying the operation to the array results in an empty array.
The operation will throw an exception if the node at path
is not an array.
The operation will do nothing if no items in the array at path
are equivalent to value
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
OPERATION_NAME |
BUNDLE, op, path, value
Constructor and Description |
---|
OmitArrayOptionalOperation(JsonPointer path,
JsonNode value) |
Modifier and Type | Method and Description |
---|---|
JsonNode |
apply(JsonNode node)
Apply this operation to a JSON value
|
serialize, serializeWithType, toString
public static final java.lang.String OPERATION_NAME
public OmitArrayOptionalOperation(JsonPointer path, JsonNode value)
public JsonNode apply(JsonNode node) throws JsonPatchException
JsonPatchOperation
node
- the value to patchJsonPatchException
- operation failed to apply to this value