Class RemoveOperation
- java.lang.Object
-
- com.github.fge.jsonpatch.operation.RemoveOperation
-
- All Implemented Interfaces:
com.fasterxml.jackson.databind.JsonSerializable,JsonPatchOperation
public class RemoveOperation extends Object implements JsonPatchOperation
JSON PathremoveoperationThis operation only takes one pointer (
path) as an argument. It is an error condition if no JSON value exists at that pointer.
-
-
Constructor Summary
Constructors Constructor Description RemoveOperation(com.github.fge.jackson.jsonpointer.JsonPointer path)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.fasterxml.jackson.databind.JsonNodeapply(com.fasterxml.jackson.databind.JsonNode node)Apply this operation to a JSON valuevoidserialize(com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider)voidserializeWithType(com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer)StringtoString()
-
-
-
Field Detail
-
OPERATION_NAME
public static final String OPERATION_NAME
- See Also:
- Constant Field Values
-
BUNDLE
protected static final com.github.fge.msgsimple.bundle.MessageBundle BUNDLE
-
op
protected final String op
-
path
protected final com.github.fge.jackson.jsonpointer.JsonPointer path
-
-
Method Detail
-
apply
public com.fasterxml.jackson.databind.JsonNode apply(com.fasterxml.jackson.databind.JsonNode node) throws JsonPatchExceptionDescription copied from interface:JsonPatchOperationApply this operation to a JSON value- Specified by:
applyin interfaceJsonPatchOperation- Parameters:
node- the value to patch- Returns:
- the patched value
- Throws:
JsonPatchException- operation failed to apply to this value
-
serialize
public void serialize(com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException, com.fasterxml.jackson.core.JsonProcessingException- Specified by:
serializein interfacecom.fasterxml.jackson.databind.JsonSerializable- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
serializeWithType
public void serializeWithType(com.fasterxml.jackson.core.JsonGenerator jgen, com.fasterxml.jackson.databind.SerializerProvider provider, com.fasterxml.jackson.databind.jsontype.TypeSerializer typeSer) throws IOException, com.fasterxml.jackson.core.JsonProcessingException- Specified by:
serializeWithTypein interfacecom.fasterxml.jackson.databind.JsonSerializable- Throws:
IOExceptioncom.fasterxml.jackson.core.JsonProcessingException
-
toString
public String toString()
- Specified by:
toStringin interfaceJsonPatchOperation- Overrides:
toStringin classObject
-
-