Compare commits
No commits in common. "054e9366573bf6aeff803495b266db31991f3173" and "6ec3e96909584cc94406eaa816bc4c9791220cb1" have entirely different histories.
054e936657
...
6ec3e96909
@ -138,11 +138,7 @@ class SelfossModel {
|
||||
object BooleanSerializer : KSerializer<Boolean> {
|
||||
override fun deserialize(decoder: Decoder): Boolean {
|
||||
val json = ((decoder as JsonDecoder).decodeJsonElement()).jsonPrimitive
|
||||
return if (json.booleanOrNull != null) {
|
||||
json.boolean
|
||||
} else {
|
||||
json.int == 1
|
||||
}
|
||||
return json.booleanOrNull ?: json.int == 1
|
||||
}
|
||||
|
||||
override val descriptor: SerialDescriptor
|
||||
|
Loading…
Reference in New Issue
Block a user