Skip to content

Commit

Permalink
Merge pull request #294 from kay-horst/add_jackson_kotlin_module_to_c…
Browse files Browse the repository at this point in the history
…onductor_client

Added Jackson Kotlin module to client ObjectMapper
  • Loading branch information
v1r3n authored Oct 21, 2024
2 parents 09d214e + 58ee198 commit 71b5e62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions conductor-clients/java/conductor-java-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ subprojects {
implementation "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${versions.jackson}"
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${versions.jackson}"

implementation "org.slf4j:slf4j-api:${versions.slf4j}"
implementation "org.apache.commons:commons-lang3:${versions.commonsLang}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.kotlin.KotlinModule;

public class ObjectMapperProvider {

Expand All @@ -36,6 +37,7 @@ private static ObjectMapper _getObjectMapper() {
JsonInclude.Include.NON_NULL, JsonInclude.Include.ALWAYS));
objectMapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
objectMapper.registerModule(new JavaTimeModule());
objectMapper.registerModule(new KotlinModule.Builder().build());
return objectMapper;
}
}
}

0 comments on commit 71b5e62

Please sign in to comment.