hello all! I’ve noticed something quite odd in a r...
# ktor
c
hello all! I’ve noticed something quite odd in a request client side. I’m using ktor in a multiplatform project (android/ios) and I’m sending an object with latitude/longitude (defined as double). If their value is 0.0, they’re not sent, if it’s a different value it is. Anything I might be doing wrong?
c
If you’re using #serialization json and those properties are the class’s default values, they won’t get encoded by default. But you can set
encodeDefaults = true
in the Json config to force them to be included
c
it was! didn’t noticed that!; thank you 🙂