aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/utils')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt b/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt
index 8dd8a504..4d951028 100644
--- a/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/utils/JSON.kt
@@ -38,14 +38,14 @@ object JSON {
val plain = Json(context = serializersModuleOf(Date::class, DateSerializer))
val nonstrict = Json(
- configuration = JsonConfiguration.Stable.copy(strictMode = false),
+ configuration = JsonConfiguration.Stable.copy(ignoreUnknownKeys = true),
context = serializersModuleOf(Date::class, DateSerializer)
)
/**
* An extension function to convert Serializable object to JS dynamic object
*/
- @UseExperimental(ImplicitReflectionSerializer::class)
+ @OptIn(ImplicitReflectionSerializer::class)
inline fun <reified T : Any> T.toObj(): dynamic {
return this.toObj(T::class.serializer())
}