public final class RemoveOperation extends Object implements JsonPatchOperation
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.
Modifier and Type | Field and Description |
---|---|
protected static MessageBundle |
BUNDLE |
protected String |
op |
static String |
OPERATION_NAME |
protected JsonPointer |
path |
Constructor and Description |
---|
RemoveOperation(JsonPointer path) |
Modifier and Type | Method and Description |
---|---|
JsonNode |
apply(JsonNode node)
Apply this operation to a JSON value
|
void |
serialize(JsonGenerator jgen,
SerializerProvider provider) |
void |
serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer) |
String |
toString() |
public static final String OPERATION_NAME
protected static final MessageBundle BUNDLE
protected final String op
protected final JsonPointer path
public RemoveOperation(JsonPointer path)
public JsonNode apply(JsonNode node) throws JsonPatchException
JsonPatchOperation
apply
in interface JsonPatchOperation
node
- the value to patchJsonPatchException
- operation failed to apply to this valuepublic void serialize(JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException
serialize
in interface JsonSerializable
IOException
JsonProcessingException
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider, TypeSerializer typeSer) throws IOException, JsonProcessingException
serializeWithType
in interface JsonSerializable
IOException
JsonProcessingException
public String toString()
toString
in interface JsonPatchOperation
toString
in class Object