Package com.gravity9.jsonpatch
Class TestOperation
- java.lang.Object
-
- com.gravity9.jsonpatch.JsonPatchOperation
-
- com.gravity9.jsonpatch.PathValueOperation
-
- com.gravity9.jsonpatch.TestOperation
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable
public final class TestOperation extends PathValueOperation
JSON PatchtestoperationThe two arguments for this operation are the pointer containing the value to test (
path) and the value to test equality against (value).It is an error if no value exists at the given path.
Also note that equality as defined by JSON Patch is exactly the same as it is defined by JSON Schema itself. As such, this operation reuses
JsonNumEqualsfor testing equality.
-
-
Field Summary
-
Fields inherited from class com.gravity9.jsonpatch.PathValueOperation
value
-
Fields inherited from class com.gravity9.jsonpatch.JsonPatchOperation
BUNDLE, op, path
-
-
Constructor Summary
Constructors Constructor Description TestOperation(java.lang.String path, com.fasterxml.jackson.databind.JsonNode value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodeapplyInternal(com.fasterxml.jackson.databind.JsonNode node)-
Methods inherited from class com.gravity9.jsonpatch.PathValueOperation
getValue, serialize, serializeWithType, toString
-
Methods inherited from class com.gravity9.jsonpatch.JsonPatchOperation
apply, getOp, getPath
-
-
-
-
Method Detail
-
applyInternal
public com.fasterxml.jackson.databind.JsonNode applyInternal(com.fasterxml.jackson.databind.JsonNode node) throws JsonPatchException- Specified by:
applyInternalin classJsonPatchOperation- Throws:
JsonPatchException
-
-