Open codeZfox opened 5 months ago
Hi, can you please clarify the issue? I do not see any usages of JsonPrimitive.intOrNull
in your code. decodeFromString
function tries to map input directly onto @Serializable
class. If a value cannot be converted to Int, an exception is thrown. "3 digit then random string"
cannot be converted to Int, because it is not appropriate to convert only a part of the string.
Extension property JsonPrimitive.intOrNull returns an invalid value instead of null when the content string starts with a digit
To Reproduce
the actual value in the number field is 3
Expected behavior the expected value in the number field is 3
Environment