Source:
public TableMetadata deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { JsonNode node = jp.readValueAsTree(); NameMetadataDescription row = deserializeRowish(node); ColumnMetadataDescription col; if (node.get("is_dynamic").asBoolean()) { col = deserializeDynamicCol(node); } else { col = deserializeNamedCols(node); } ConflictHandler conflictHandler = Optional.ofNullable(node.get("conflictHandler")) .map(JsonNode::textValue).map(ConflictHandler::valueOf).orElse(ConflictHandler.IGNORE_ALL); CachePriority cachePriority = Optional.ofNullable(node.get("cachePriority")) .map(JsonNode::textValue).map(CachePriority::valueOf).orElse(CachePriority.WARM); boolean rangeScanAllowed = Optional.ofNullable(node.get("rangeScanAllowed")) .map(JsonNode::booleanValue).orElse(false); int compressionBlockSize = Optional.ofNullable(node.get("explicitCompressionBlockSizeKB")) .map(JsonNode::numberValue).map(Number::intValue).orElse(0); boolean negativeLookups = Optional.ofNullable(node.get("negativeLookups")) .map(JsonNode::booleanValue).orElse(false); SweepStrategy sweepStrategy = Optional.ofNullable(node.get("sweepStrategy")) .map(JsonNode::textValue).map(SweepStrategy::valueOf).orElse(SweepStrategy.CONSERVATIVE); boolean appendHeavyAndReadLight = Optional.ofNullable(node.get("appendHeavyAndReadLight")) .map(JsonNode::booleanValue).orElse(false); LogSafety logSafety = Optional.ofNullable(node.get("nameLogSafety")) .map(JsonNode::textValue).map(LogSafety::valueOf).orElse(LogSafety.UNSAFE); return new TableMetadata( row, col, conflictHandler, cachePriority, rangeScanAllowed, compressionBlockSize, negativeLookups, sweepStrategy, appendHeavyAndReadLight, logSafety); }

Target:
public TableMetadata deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { JsonNode node = jp.readValueAsTree(); NameMetadataDescription row = deserializeRowish(node); ColumnMetadataDescription col; if (node.get("is_dynamic").asBoolean()) { col = deserializeDynamicCol(node); } else { col = deserializeNamedCols(node); } ConflictHandler conflictHandler = Optional.ofNullable(node.get("conflictHandler")) .map(JsonNode::textValue).map(ConflictHandler::valueOf).orElse(ConflictHandler.RETRY_ON_WRITE_WRITE); CachePriority cachePriority = Optional.ofNullable(node.get("cachePriority")) .map(JsonNode::textValue).map(CachePriority::valueOf).orElse(CachePriority.WARM); boolean rangeScanAllowed = Optional.ofNullable(node.get("rangeScanAllowed")) .map(JsonNode::booleanValue).orElse(false); int compressionBlockSize = Optional.ofNullable(node.get("explicitCompressionBlockSizeKB")) .map(JsonNode::numberValue).map(Number::intValue).orElse(0); boolean negativeLookups = Optional.ofNullable(node.get("negativeLookups")) .map(JsonNode::booleanValue).orElse(false); SweepStrategy sweepStrategy = Optional.ofNullable(node.get("sweepStrategy")) .map(JsonNode::textValue).map(SweepStrategy::valueOf).orElse(SweepStrategy.CONSERVATIVE); boolean appendHeavyAndReadLight = Optional.ofNullable(node.get("appendHeavyAndReadLight")) .map(JsonNode::booleanValue).orElse(false); LogSafety logSafety = Optional.ofNullable(node.get("nameLogSafety")) .map(JsonNode::textValue).map(LogSafety::valueOf).orElse(LogSafety.UNSAFE); return new TableMetadata( row, col, conflictHandler, cachePriority, rangeScanAllowed, compressionBlockSize, negativeLookups, sweepStrategy, appendHeavyAndReadLight, logSafety); }