com.github.fge.jsonpatch.operation
Class TranslateOperation

java.lang.Object
  extended by com.github.fge.jsonpatch.operation.PathDualValueOperation
      extended by com.github.fge.jsonpatch.operation.TranslateOperationBase
          extended by com.github.fge.jsonpatch.operation.TranslateOperation
All Implemented Interfaces:
JsonSerializable, JsonPatchOperation

public final class TranslateOperation
extends TranslateOperationBase

Extended JSON Patch translate operation. The operation will translate a fromValue to a toValue at path if it exists. It will do nothing if the actual value at path is not equal to fromValue. It will throw a "no such path" error if there is no value at path.


Field Summary
static String OPERATION_NAME
           
 
Fields inherited from class com.github.fge.jsonpatch.operation.PathDualValueOperation
BUNDLE, fromValue, op, path, toValue
 
Constructor Summary
TranslateOperation(JsonPointer path, JsonNode fromValue, JsonNode toValue)
           
 
Method Summary
 
Methods inherited from class com.github.fge.jsonpatch.operation.TranslateOperationBase
apply
 
Methods inherited from class com.github.fge.jsonpatch.operation.PathDualValueOperation
serialize, serializeWithType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPERATION_NAME

public static final String OPERATION_NAME
See Also:
Constant Field Values
Constructor Detail

TranslateOperation

public TranslateOperation(JsonPointer path,
                          JsonNode fromValue,
                          JsonNode toValue)