Tinder / Scarlet

A Retrofit inspired WebSocket client for Kotlin, Java, and Android
Other
3.2k stars 236 forks source link

Malformed JSON when uses Gson #212

Open vishalbhanderii opened 2 years ago

vishalbhanderii commented 2 years ago

I am using GsonMessageAdapter.Factory() but i get {"type":"error","message":"Malformed JSON"} response. Can anyone tell how to use model class with scarlet? or if any example is there to use gson in scarlet

aaronweihe commented 1 year ago

can you share the response? if you are using Gson, just install the Gson adapter factory. refer to https://github.com/google/gson on how to annotate your model classes to work with Gson