mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-13 15:54:59 +01:00
Fix json
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
5716d9a104
commit
cb2696871d
@ -22,22 +22,10 @@
|
|||||||
|
|
||||||
package com.nextcloud.talk.newarch.utils
|
package com.nextcloud.talk.newarch.utils
|
||||||
|
|
||||||
import kotlinx.serialization.json.JsonConfiguration
|
import kotlinx.serialization.json.JsonConfiguration.Companion.Stable
|
||||||
|
|
||||||
sealed class MagicJson {
|
sealed class MagicJson {
|
||||||
companion object {
|
companion object {
|
||||||
private val defaultIndent: String = " "
|
val customJsonConfiguration = Stable.copy(prettyPrint = true, useArrayPolymorphism = true)
|
||||||
private val defaultDiscriminator = "type"
|
|
||||||
|
|
||||||
val customJsonConfiguration = JsonConfiguration(
|
|
||||||
encodeDefaults = true,
|
|
||||||
strictMode = true,
|
|
||||||
unquoted = false,
|
|
||||||
allowStructuredMapKeys = true,
|
|
||||||
prettyPrint = true,
|
|
||||||
indent = defaultIndent,
|
|
||||||
useArrayPolymorphism = true,
|
|
||||||
classDiscriminator = defaultDiscriminator
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user