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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 java.io.IOException,
JsonProcessingException
- Throws:
java.io.IOException
JsonProcessingException
serializeWithType
public void serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
throws java.io.IOException,
JsonProcessingException
- Throws:
java.io.IOException
JsonProcessingException
toString
public java.lang.String toString()
- Specified by:
toString in class JsonPatchOperation