bissell
05/26/2018, 7:54 PMString
or Long
in Kotlin? My first thought was to attempt to read the field as a Number, and then if that fails (presumably because the field is another JSON type), then try to read it as String. But I haven't been able to write a method that can do this.gildor
05/27/2018, 7:23 AMbissell
05/27/2018, 2:46 PMid
field sent by a client may have a String, a Number, or null, and the server is meant to always return exactly the same value in the responsegildor
05/27/2018, 4:18 PMbissell
05/27/2018, 10:08 PMid
back out, and doesn't know whether to write 5
or "5"
gildor
05/28/2018, 3:11 AMJSON
parser implementation and add support of such parsing. Maybe there are some other solutions, but I don’t see them without change API of kotlinx.serialization.
Anyway, maybe make sense to create an issue with you case on kotlinx.serialization tracker