Retrofit with simple json response containing only an integer or a string -


the rest api i'm calling returns integer: 12.

as far know valid json although have been happier if change response on server side more canonical. unfortunately not option me.

is there way use retrofit handle response too?

edit

see: this question , spec

so seems new spec allows use simple string or integer json text

i found way it: use integer template parameter restcallback:

new restcallback<integer>() {...} 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -