Scarlet icon indicating copy to clipboard operation
Scarlet copied to clipboard

Use multiple adapters?

Open priccis opened this issue 6 years ago • 1 comments

From the server I receive multiple kinds of data, some are JSON, other are binaries that contain JSON inside a protobuf message.

So, I would like to use both the Moshi and Protobuf adapters. Is this possible, or there's another way to handle this situations?

priccis avatar Jun 28 '19 18:06 priccis

Is this done passing multiple factories? messageAdapterFactories = listOf(ProtobufMessageAdapter.Factory(), MoshiMessageAdapter.Factory())

How does Scarlet decides which to use when?

priccis avatar Jun 28 '19 18:06 priccis