diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-04-16 18:07:11 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-04-16 18:07:11 +0200 |
commit | 856d753c7f335dacd9cc4daf666a152378886200 (patch) | |
tree | 549c667ba6047a0405bd112d8e91be117c798012 /kvision-modules/kvision-remote/src/main | |
parent | 2382d82d5aaed8e6519da9e82d771ee94007b2cd (diff) | |
download | kvision-856d753c7f335dacd9cc4daf666a152378886200.tar.gz kvision-856d753c7f335dacd9cc4daf666a152378886200.tar.bz2 kvision-856d753c7f335dacd9cc4daf666a152378886200.zip |
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
Diffstat (limited to 'kvision-modules/kvision-remote/src/main')
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt | 2 | ||||
-rw-r--r-- | kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Utils.kt | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt index 52c0f7c3..06e150e4 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/RemoteAgent.kt @@ -198,7 +198,7 @@ interface RemoteAgent { } } - private fun findEnumValue(kClass: KClass<Any>, value: String): Any? { + fun findEnumValue(kClass: KClass<Any>, value: String): Any? { return (kClass.asDynamic().jClass.values() as Array<Any>).find { it.asDynamic().name == value } diff --git a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Utils.kt b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Utils.kt index c4f4ed6d..465fbf59 100644 --- a/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Utils.kt +++ b/kvision-modules/kvision-remote/src/main/kotlin/pl/treksoft/kvision/remote/Utils.kt @@ -22,8 +22,9 @@ package pl.treksoft.kvision.remote 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 pl.treksoft.kvision.types.JsonDateSerializer import kotlin.browser.window import kotlin.js.Date @@ -45,13 +46,12 @@ fun obj(init: dynamic.() -> Unit): dynamic { */ object JSON { - val plain = Json().apply { - install(SimpleModule(Date::class, JsonDateSerializer)) - } + val plain = Json(context = serializersModuleOf(Date::class, JsonDateSerializer)) - val nonstrict = Json(strictMode = false).apply { - install(SimpleModule(Date::class, JsonDateSerializer)) - } + val nonstrict = Json( + configuration = JsonConfiguration.Stable.copy(strictMode = false), + context = serializersModuleOf(Date::class, JsonDateSerializer) + ) /** * An extension function to convert Serializable object to JS dynamic object |