Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gson for serialization/deserialization #195

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 3 additions & 10 deletions src/jvmMain/kotlin/Module.kt
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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()
}
}

Expand Down
Loading