fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 505 forks source link

ObjectMapper customization #7080

Open alonbl opened 5 years ago

alonbl commented 5 years ago

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!