Hi, I'm new to serialization(in JS it is just about JSON.stringify and JSON.parse from my perspective) , could someone tell me why the code below doesn't print
name:"foo"
? though I didn't initialize the field in the constructor, but they got a default value.
Also #serialization is probably better channel to ask about it
x
xun su
11/29/2022, 2:19 AM
thanks! wow serialization has its own channel, I've never thought about that😅
l
Landry Norris
11/29/2022, 1:58 PM
I believe there’s a setting for Json to encode default values, but I’d assume it’s off by default to reduce bandwidth requirements for Kotlin-Kotlin communication (for example, ktor client to ktor server).