class JsonConverter extends AbstractConfigurationConverter {

    Number readNumberFromValue(final String key, final @Nullable Object value) throws ComponentConfigurationException {
        if (value instanceof Number) {
            return (Number) value;
        } else if (value instanceof String) {
            Object readValue = stringToValue((String) value);
            if (readValue instanceof Number) {
                return (Number) readValue;
            } else if (!isBlankish(readValue)) {
                throw new ComponentConfigurationException("Failed to parse value for key " + key + " as number.");
            }
        }
        return null;
    }

}