Duration dropWizardDuration = Duration.parse(fieldValue.asText());
long asLong = time.value().convert(dropWizardDuration.getQuantity(), dropWizardDuration.getUnit());
fieldValues.put(propertyName, asLong);
} else if ((prop.getAnnotation(Bytes.class) != null) &&
NUMBER_UNIT.matcher(fieldValue.textValue()).matches()) {
Size dropWizardSize = Size.parse(fieldValue.asText());
long asLong = dropWizardSize.toBytes();
fieldValues.put(propertyName, asLong);
}
} catch (Throwable cause) {
throw JsonMappingException.wrapWithPath(cause, prop.getType().getRawClass(), propertyName);
}