Join Slack
Communities
Powered by
How would I go and figure out why this is happenin...
# serialization
j
jeggy
11/30/2022, 3:52 PM
How would I go and figure out why this is happening? I have no clue why it's just giving me an empty object.
j
jw
11/30/2022, 3:54 PM
Default values are not encoded
jw
11/30/2022, 3:55 PM
https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/basic-serialization.md#defaults-are-not-encoded-by-default
j
jeggy
11/30/2022, 3:58 PM
Thanks, got it working now. But this means it got changed in some update? As it was not like this always.
j
jw
11/30/2022, 3:58 PM
It's been like this since 1.0. No idea when it was introduced before then.
jw
11/30/2022, 3:59 PM
seems like in 1.0-rc-2 the behavior was made opt-in rather than opt-in
https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md#100-rc2--2020-09-21
10
Views
Open in Slack
Previous
Next