From 856d753c7f335dacd9cc4daf666a152378886200 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Tue, 16 Apr 2019 18:07:11 +0200 Subject: Upgrade Kotlin to 1.3.30 Upgrade coroutines to 1.2.0 Upgrade serialization to 0.11.0 Upgrade Ktor to 1.1.4 Upgrade Spring Boot to 2.1.4 --- src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/kotlin/pl/treksoft/kvision/utils') diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt b/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt index e30935ab..8dd8a504 100644 --- a/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt +++ b/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt @@ -23,8 +23,9 @@ package pl.treksoft.kvision.utils import kotlinx.serialization.ImplicitReflectionSerializer import kotlinx.serialization.SerializationStrategy -import kotlinx.serialization.context.SimpleModule import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonConfiguration +import kotlinx.serialization.modules.serializersModuleOf import kotlinx.serialization.serializer import pl.treksoft.kvision.types.DateSerializer import kotlin.js.Date @@ -34,13 +35,12 @@ import kotlin.js.Date */ object JSON { - val plain = Json().apply { - install(SimpleModule(Date::class, DateSerializer)) - } + val plain = Json(context = serializersModuleOf(Date::class, DateSerializer)) - val nonstrict = Json(strictMode = false).apply { - install(SimpleModule(Date::class, DateSerializer)) - } + val nonstrict = Json( + configuration = JsonConfiguration.Stable.copy(strictMode = false), + context = serializersModuleOf(Date::class, DateSerializer) + ) /** * An extension function to convert Serializable object to JS dynamic object -- cgit