At the moment, the client library uses Gson for deserializing stream configurations, and serializing events for sending.
Gson is a rather outdated library, and Google explicitly says that "Gson is not a recommended library for interacting with JSON on Android." This is because Gson uses reflection for serializing, which is inefficient and prone to bugs, whereas more modern libraries use code-generation, i.e. compile-time adapters for serializing.
This task is to move the client library onto a newer serialization library capable of compile-time codegen, such as Moshi or Kotlinx.serialization. Alternatively, make the client library somehow "delegate" serialization to the consumer, and not worry about serialization itself.