pajatopmr
12/17/2020, 10:30 PM{"foo":"fooValue","fee":"feeValue"}
and `{"fee":"feeValue","foo":"fooValue"}`should deserialize to the same object. But this is apparently not the case with KXS. Is there some fine print that says JSON implementors can do pretty much what they want or is this a bug of some sort? My assumption is the former so that means transforming incoming JSON to a correct order. Any chance I have this assumption wrong?Vampire
12/17/2020, 10:38 PMVampire
12/17/2020, 10:44 PMHankG
12/17/2020, 11:22 PMHankG
12/17/2020, 11:23 PM@Serializable
data class TestData(val fee:String, val foo:String)
...
val json1 = "{\"fee\":\"feeValue\",\"foo\":\"fooValue\"}"
val json2 = "{\"foo\":\"fooValue\",\"fee\":\"feeValue\"}"
val obj1 = decodeFromString(TestData.serializer(), json1)
val obj2 = decodeFromString(TestData.serializer(), json2)
println(obj1)
println(obj2)
println(obj1 == obj2)
pajatopmr
12/17/2020, 11:25 PMVampire
12/17/2020, 11:26 PMpajatopmr
12/17/2020, 11:29 PMpajatopmr
12/18/2020, 5:27 AM