Hi, is there a known best practice for encoding/de...
# getting-started
m
Hi, is there a known best practice for encoding/decoding kotlin objects to/from Base64 String instead of going object -> json string -> base64 and the opposite?
j
Base64 is just a way to encode binary data as text. In order to serialize Kotlin objects as Base64 strings, you would have to first choose a way to serialize them as binary
☝️ 2
👀 1
s
If you don't need your serialised data to be human-readable, there are quite a few other options you could use besides JSON. Protocol buffers could be a good choice.
m
thanks, though it might be a bit weird since I'm going to use it for a continuation token field in a grpc api 🤔 it actually might be the better option. 🙏