Class RemoveOperation

  • All Implemented Interfaces:
    com.fasterxml.jackson.databind.JsonSerializable, JsonPatchOperation

    public class RemoveOperation
    extends Object
    implements 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.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

        com.fasterxml.jackson.databind.JsonSerializable.Base
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static com.github.fge.msgsimple.bundle.MessageBundle BUNDLE  
      protected String op  
      static String OPERATION_NAME  
      protected com.github.fge.jackson.jsonpointer.JsonPointer path  
    • Constructor Summary

      Constructors 
      Constructor Description
      RemoveOperation​(com.github.fge.jackson.jsonpointer.JsonPointer path)  
    • Field Detail

      • 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
    • Constructor Detail

      • RemoveOperation

        public RemoveOperation​(com.github.fge.jackson.jsonpointer.JsonPointer path)
    • Method Detail

      • apply

        public com.fasterxml.jackson.databind.JsonNode apply​(com.fasterxml.jackson.databind.JsonNode node)
                                                      throws JsonPatchException
        Description copied from interface: JsonPatchOperation
        Apply this operation to a JSON value
        Specified by:
        apply in interface JsonPatchOperation
        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:
        serialize in interface com.fasterxml.jackson.databind.JsonSerializable
        Throws:
        IOException
        com.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:
        serializeWithType in interface com.fasterxml.jackson.databind.JsonSerializable
        Throws:
        IOException
        com.fasterxml.jackson.core.JsonProcessingException