From c59c7d375af459a5b9d884c424e7ea58b07a210e Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 21 Nov 2024 16:32:33 -0500 Subject: [PATCH] Use gson --- gradle.properties | 2 +- src/jvmMain/kotlin/Module.kt | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 607036f..bc149e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ kotlin.code.style=official kotlin.js.generate.executable.default=false # versions -fhirCoreVersion= 6.4.2 +fhirCoreVersion= 6.4.4-SNAPSHOT junitVersion=5.7.1 mockk_version=1.10.2 diff --git a/src/jvmMain/kotlin/Module.kt b/src/jvmMain/kotlin/Module.kt index 3333469..0b6c5f5 100644 --- a/src/jvmMain/kotlin/Module.kt +++ b/src/jvmMain/kotlin/Module.kt @@ -1,5 +1,4 @@ -import com.fasterxml.jackson.databind.DeserializationFeature -import com.fasterxml.jackson.databind.SerializationFeature +import io.ktor.serialization.gson.* import controller.debug.debugModule import controller.ig.igModule import controller.terminology.terminologyModule @@ -85,14 +84,8 @@ fun Application.setup() { } install(ContentNegotiation) { - jackson { - enable(SerializationFeature.INDENT_OUTPUT) - - /* - * Right now we need to ignore unknown fields because we take a very simplified version of many of the fhir - * model classes, and map them to classes across JVM/Common/JS. - */ - configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + gson { + setPrettyPrinting() } }