com.github.fge.jsonpatch.operation
Class TranslateOperationBase
java.lang.Object
com.github.fge.jsonpatch.operation.PathDualValueOperation
com.github.fge.jsonpatch.operation.TranslateOperationBase
- All Implemented Interfaces:
- JsonSerializable, JsonPatchOperation
- Direct Known Subclasses:
- TranslateOperation, TranslateOptionalOperation
public abstract class TranslateOperationBase
- extends PathDualValueOperation
TranslateOperationBase implements the basic concept of translating from one specified value to another
at the requested path.
TranslateOperationBase
public TranslateOperationBase(String op,
JsonPointer path,
JsonNode fromValue,
JsonNode toValue,
PathMissingPolicy pathMissingPolicy)
apply
public JsonNode apply(JsonNode node)
throws JsonPatchException
- Description copied from interface:
JsonPatchOperation
- Apply this operation to a JSON value
- Parameters:
node
- the value to patch
- Returns:
- the patched value
- Throws:
JsonPatchException
- operation failed to apply to this value