if (operation instanceof RemoveOperation) {
// Replace remove operation with replace operation and a value of null.
JsonPointer path = (JsonPointer) ReflectionUtils.getField(PATH_FIELD, operation);
patchedNode = new ReplaceOperation(path, NullNode.getInstance()).apply(patchedNode);
} else {
patchedNode = operation.apply(patchedNode);
}
}