diff --git a/common/src/main/kotlin/fund/cyber/search/Serialization.kt b/common/src/main/kotlin/fund/cyber/search/Serialization.kt index 053eca64..f0ee4016 100644 --- a/common/src/main/kotlin/fund/cyber/search/Serialization.kt +++ b/common/src/main/kotlin/fund/cyber/search/Serialization.kt @@ -8,11 +8,14 @@ import com.fasterxml.jackson.datatype.jdk8.Jdk8Module import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import com.fasterxml.jackson.module.kotlin.registerKotlinModule -val jsonSerializer = ObjectMapper().registerKotlinModule() - .registerModule(Jdk8Module()) - .registerModule(JavaTimeModule()) +val jsonSerializer = ObjectMapper() + .enable(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS) + .enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN) .setSerializationInclusion(JsonInclude.Include.NON_NULL) - .enable(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS)!! + .registerKotlinModule() + .registerModule(Jdk8Module()) + .registerModule(JavaTimeModule())!! + val jsonDeserializer = ObjectMapper().registerKotlinModule() .registerModule(Jdk8Module())