Class RemoveIfExistsOperation
java.lang.Object
com.linecorp.centraldogma.common.jsonpatch.JsonPatchOperation
com.linecorp.centraldogma.common.jsonpatch.RemoveIfExistsOperation
- All Implemented Interfaces:
JsonSerializable
JSON Path
removeIfExists operation.
This operation only takes one pointer (path) as an argument. Unlike, RemoveOperation, it
does not throw an error if no JSON value exists at that pointer.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable
JsonSerializable.Base -
Method Summary
Modifier and TypeMethodDescriptionApplies this operation to a JSON value.voidserialize(JsonGenerator jgen, SerializerProvider provider) voidserializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) toString()Methods inherited from class com.linecorp.centraldogma.common.jsonpatch.JsonPatchOperation
add, add, asJsonArray, asJsonArray, copy, copy, equals, hashCode, move, move, op, path, remove, remove, removeIfExists, removeIfExists, replace, replace, safeReplace, safeReplace, test, test, testAbsence, testAbsence, toJsonNode
-
Method Details
-
apply
Description copied from class:JsonPatchOperationApplies this operation to a JSON value.- Specified by:
applyin classJsonPatchOperation- Parameters:
node- the value to patch- Returns:
- the patched value
-
serialize
- Throws:
IOException
-
serializeWithType
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException - Throws:
IOException
-
toString
- Specified by:
toStringin classJsonPatchOperation
-