Page MenuHomePhabricator

[Java] No longer use Gson for serialization in client library.
Open, MediumPublic

Description

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.

Event Timeline

Milimetric triaged this task as Medium priority.Jun 30 2025, 3:26 PM
Milimetric moved this task from Incoming to Backlog on the Test Kitchen board.

@Dbrant @JTannerWMF Does this task cover the work needed to eliminate the technical issue that blocks Android from moving to Experiment Platform?

Does this task cover the work needed to eliminate the technical issue that blocks Android from moving to Experiment Platform?

This is more like a subtask (I just associated it with the parent task, yet to be estimated.)