com.github.fge.jsonpatch
Class RemoveOperation
java.lang.Object
com.github.fge.jsonpatch.JsonPatchOperation
com.github.fge.jsonpatch.RemoveOperation
- All Implemented Interfaces:
- JsonSerializable
public final class RemoveOperation
- extends JsonPatchOperation
JSON Path remove
operation
This operation only takes one pointer (path
) as an argument. It
is an error condition if no JSON value exists at that pointer.
RemoveOperation
public RemoveOperation(JsonPointer path)
apply
public JsonNode apply(JsonNode node)
throws JsonPatchException
- Description copied from class:
JsonPatchOperation
- Apply this operation to a JSON value
- Specified by:
apply
in class JsonPatchOperation
- Parameters:
node
- the value to patch
- Returns:
- the patched value
- Throws:
JsonPatchException
- operation failed to apply to this value
serialize
public void serialize(JsonGenerator jgen,
SerializerProvider provider)
throws IOException,
JsonProcessingException
- Throws:
IOException
JsonProcessingException
serializeWithType
public void serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
throws IOException,
JsonProcessingException
- Throws:
IOException
JsonProcessingException
toString
public String toString()
- Specified by:
toString
in class JsonPatchOperation