com.github.fge.jsonpatch.operation
Class PathDualValueOperation
java.lang.Object
com.github.fge.jsonpatch.operation.PathDualValueOperation
- All Implemented Interfaces:
- JsonSerializable, JsonPatchOperation
- Direct Known Subclasses:
- TranslateOperationBase
public abstract class PathDualValueOperation
- extends Object
- implements JsonPatchOperation
Base class for JSON Patch operations taking one JSON Pointer and two values as arguments
BUNDLE
protected static final MessageBundle BUNDLE
op
protected final String op
path
protected final JsonPointer path
fromValue
protected final JsonNode fromValue
toValue
protected final JsonNode toValue
PathDualValueOperation
protected PathDualValueOperation(String op,
JsonPointer path,
JsonNode fromValue,
JsonNode toValue)
- Protected constructor
- Parameters:
op
- operation namepath
- source pathfromValue
- original pathtoValue
- new value
serialize
public final void serialize(JsonGenerator jgen,
SerializerProvider provider)
throws IOException,
JsonProcessingException
- Specified by:
serialize
in interface JsonSerializable
- Throws:
IOException
JsonProcessingException
serializeWithType
public final void serializeWithType(JsonGenerator jgen,
SerializerProvider provider,
TypeSerializer typeSer)
throws IOException,
JsonProcessingException
- Specified by:
serializeWithType
in interface JsonSerializable
- Throws:
IOException
JsonProcessingException
toString
public final String toString()
- Specified by:
toString
in interface JsonPatchOperation
- Overrides:
toString
in class Object