fabric8io/fabric8

ObjectMapper customization

alonbl opened this issue · 0 comments

Hello,

We tried to use dates within k8s custom resources and failed as fabric8 initialize ObjectMapper internally without registering the JavaTimeModule module.

For example:

ObjectMapper mapper = new ObjectMapper(new YAMLFactory()).registerModule(new JavaTimeModule());

Looking at the code there are many cases in which ObjectMapper is constructed, and it is impossible to override the options at a single place.

Can you please consider to have a single centralize point in which ObjectMapper can be registered for yaml and for json so that library can be configured to use with correct ObjectMapper settings?

Alternatively, can you please register the JavaTimeModule for all instances that handles external data structures?

Thanks!