Skip to content

Commit

Permalink
Add ignoreUnknownKeys to defaultJson
Browse files Browse the repository at this point in the history
  • Loading branch information
bjsvedin committed Oct 16, 2024
1 parent 7be5cad commit 8aed6d8
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ import kotlinx.serialization.serializer
var DefaultSerializersModule: SerializersModule = EmptySerializersModule()
set(value) {
field = value
DefaultJsonCurrent = Json { serializersModule = DefaultSerializersModule }
DefaultJsonCurrent = Json {
serializersModule = DefaultSerializersModule
ignoreUnknownKeys = true
}
UrlPropertiesCurrent = Properties(DefaultSerializersModule)
}
private var DefaultJsonCurrent: Json = Json { serializersModule = DefaultSerializersModule }
private var DefaultJsonCurrent: Json = Json {
serializersModule = DefaultSerializersModule
ignoreUnknownKeys = true
}
val DefaultJson: Json get() = DefaultJsonCurrent
private var UrlPropertiesCurrent: Properties = Properties(DefaultSerializersModule)
val UrlProperties: Properties get() = UrlPropertiesCurrent
Expand Down

0 comments on commit 8aed6d8

Please sign in to comment.