Bram Yeh
1 min readMar 19, 2019

--

This is because there are lots responses with different T, to avoid customizing many converter for each API methods, I want to get a single and global TypeAdapter to transforms all kind of Data<T> into T.

By this solution, I convert all ResponseBody to Data<T>, and then convert to T.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Bram Yeh
Bram Yeh

Written by Bram Yeh

Lead Android & iOS Mobile Engineer at Yahoo (Verizon Media) Taiwan https://www.linkedin.com/in/hanruyeh/

No responses yet

Write a response