With the upgrade to Jackson 3, the increased separation between data formats, and RSocket support using Jackson's CBOR support, we could do with some auto-configuration for that format. Mirroring our existing JSON support, it should:
- Auto-configure a
CBORMapper.Buildercustomisable using - A customizer callback
- Common
spring.jacksonproperties - CBOR-specific
spring.jackson.cborproperties - Auto-configure a
CBORMapperfrom the context'sCBORMapper.Builder
Comment From: wilkinsona
Re-opening to consider if we want to remove @Primary from the CBORMapper bean. The JSON ObjectMapper has been @Primary from when it was introduced, but it's not clear why. I think we can probably remove @Primary from the CBORMapper. This will make upgrades easier as any injection point that changes from com.fasterxml.jackson.databind.ObjectMapper to tools.jackson.databind.ObjectMapper will continue to receive the JSON format mapper irrespective of the presence of CBOR.