Maybe a dumb question. But im working on a library...
# squarelibraries
c
Maybe a dumb question. But im working on a library (regretfully 😂) and we need to make network calls. would love to use okhttp + kotlinx.serialization, but we don't want to go all in and pull in retrofit. Is there an "easy" way to deserialization with okhttp without brining in retrofit?
m
There are okio helpers for kotlinx.serialization
Use them with
response.body
j
Only for JSON
✅ 2
Otherwise you have to read the data into a
ByteArray
or
String
and then decode from that using whatever
BinaryFormat
or
StringFormat
you are using.
c
oh yeahhhh. glad I asked. Thank you!
"They thought of everything!"