You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try encode Char, it encoded with double quotes. If we try to decode, it fails. Decoder wants single-quoted chars:
@Serializable
data class Foo(val foo: Char= 'x')
fun main(){
val s = Toml().encodeToString(Foo('f'))
println(s) // foo = "f"
// decode exception
val config = Toml().decodeFromString<Foo>(s)
// single-quoted decoded ok
Toml().decodeFromString<Foo>("doo='f'")
}
The text was updated successfully, but these errors were encountered:
@chabapok, As per the TOML specification, there is no predefined Char type. However, we've introduced the concept in our TOML implementation to align more closely with Kotlin's syntax. So we are expecting Chars to have single quote on the decoding.
Probably we need to make it more convenient and do encoding and decoding similar.
If we try encode Char, it encoded with double quotes. If we try to decode, it fails. Decoder wants single-quoted chars:
The text was updated successfully, but these errors were encountered: