natario1
05/21/2021, 5:01 PMclass Sms(val phone: String, val code: String)
into {"sms":{"phone":"1230129","code":"23984"}}
... I know that I can add SmsWrapper(val sms: Sms)
and require people to use it, but I'd like to use a custom serializer instead. Is there any example to do such thing?
I see many examples where structures are flattened (e.g. you remove a {}
container), but couldn't find one where you do the opposite (nest data in a new {}
).Ben Woodworth
05/21/2021, 10:11 PMBen Woodworth
05/21/2021, 10:16 PM"sms"
diesieben07
05/22/2021, 4:21 PM