0

I want to use the CBORGenerator.Feature.LENIENT_UTF_ENCODING enum that was introduced in version 2.12 of the jackson-dataformats-binary library. I am using version 2.16.0 of the library.

I thought I could do something like this:

CBORMapper.builder()
    .enable(CBORGenerator.Feature.LENIENT_UTF_ENCODING)
    .build();

but this gives me this error:

error: no suitable method found for enable(com.fasterxml.jackson.dataformat.cbor.CBORGenerator.Feature)
              .enable(CBORGenerator.Feature.LENIENT_UTF_ENCODING)
              ^

I tried using .configure(CBORGenerator.Feature.LENIENT_UTF_ENCODING, true) instead, but then I get this error:

error: no suitable method found for configure(com.fasterxml.jackson.dataformat.cbor.CBORGenerator.Feature,boolean)
              .configure(CBORGenerator.Feature.LENIENT_UTF_ENCODING, true)
              ^

How can I correctly create a CBORMapper instance for CBOR decoding with LENIENT_UTF_ENCODING enabled?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.