I am using Java 17, spring-boot 2.6.3 with spring-webflux and spring-consul dependencies and I have the following class: Here’s my custom serializer. And my models are as simples as this: I can’t annotate my model class with @JsonSerialize(using = ModelSerializer.class) because it is in a dependen…
Tag: jackson-modules
Jackson , java.time , ISO 8601 , serialize without milliseconds
I’m using Jackson 2.8 and need to communicate with an API that doesn’t allow milliseconds within ISO 8601 timestamps. The expected format is this: “2016-12-24T00:00:00Z” I’m using Jackson’s JavaTimeModule with WRITE_DATES_AS_TIMESTAMPS set to false. But this will print mill…