class BigDecimalConverter implements PropertyConverter<BigDecimal> {

    @Override
    public BigDecimal convert(String value, ConversionContext ctx) {
        ctx.addSupportedFormats(getClass(), "<bigDecimal> -> new BigDecimal(String)");
        if(value==null){
            return null;
        }
        String trimmed = value.trim();
        try{
            return new BigDecimal(trimmed);
        } catch(Exception e){
            LOG.finest("Parsing BigDecimal failed, trying BigInteger for: " + value);
            BigInteger bigInt = integerConverter.convert(value, ctx);
            if(bigInt!=null){
                return new BigDecimal(bigInt);
            }
            LOG.finest("Failed to parse BigDecimal from: " + value);
            return null;
        }
    }

}