0

In theory, this is a RTFM question, but I've found myself lost in the documentation.

With standard Jackson Databind ObjectMapper, we can call mapper.configure(SerializationFeature.WRITE_ENUMS_USING_INDEX, true);

How do I achieve the same control over Serde's Jackson ObjectMappers?

I've seen JacksonConfiguration, but that seems to be for setting one mapper for the entire application, and we have 3 systems we have to translate data from differently (enums by index is one such example, timestamps as longs vs ISO-8601 date strings). We have a JsonUtil class which holds 3 internal ObjectMappers which we use by calling

JsonUtil.parseJsonSys1/Sys2/Sys3(Class clazz, String json);

What's the "correct" way to do that with Micronaut Serialization?

patrickjp93
  • 399
  • 4
  • 20

0 Answers0