class PeriodicPaymentJsonPartConverter implements Converter<String, PeriodicPaymentInitiationXmlPart2StandingorderTypeJson> {

    @Override
    public PeriodicPaymentInitiationXmlPart2StandingorderTypeJson convert(String source) {
        if (StringUtils.isEmpty(source)) {
            return null;
        }

        try {
            return xs2aObjectMapper.readValue(source, PeriodicPaymentInitiationXmlPart2StandingorderTypeJson.class);
        } catch (IOException e) {
            log.info("Can't convert json to object: {}", e.getMessage());
            return null;
        }
    }

}