You can do something like this and have all the cu...
# http4k
j
You can do something like this and have all the customization freedom @xuemin.guan:
Copy code
val json = ConfigurableJackson(ObjectMapper().apply {
   registerModule(KotlinModule())

   registerModule(SimpleModule().apply {
        addSerializer(LocalDateTime::class.java, LocalDateTimeSerializer(DateTimeFormatter.ISO_LOCAL_DATE_TIME))
    })
       
    enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS)
})
and then:
json.asJsonString(...)
Not sure if this is the idiomatic way @dave?