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
Currently, numeric JSON values containing a decimal point cannot be decoded as integer types.
An example of such values: 1.0, 1.0E1, -1.5E3, 0.5e2.
Decoding it as long fails with an error:
println(Json.decodeFromString<Int>("1.0e1"))
kotlinx.serialization.json.internal.JsonDecodingException:UnexpectedJSON token at offset 0:Unexpected symbol '.'in numeric literal at path: $
It would be beneficial if these values could be decoded. Alternatively, it should be documented that such form is not supported.