Skip to main content

All Questions

Tagged with
0 votes
0 answers
25 views

Receiving an empty body in a retrofit response

I am using retrofit to get data from the ticketmaster API My class Event: `public class Event implements Parcelable { private String name; private String id; private String url; private String ...
Martina Kenna's user avatar
0 votes
0 answers
44 views

Adding GSONConvertorFactory to retrofit2 while calling an API

I have many API's which I am calling from my application. On response I have default GsonConvertorFactory which converts the JSON response to the corresponding Java objects with exact number and name ...
shubham's user avatar
  • 47
0 votes
1 answer
76 views

retrofit2 parse a multiline json response

I'm trying to consume from an API that streams JSON object, one per line, using retrofit2. The response look something like this {"key":" value", ...} {"key":" value&...
bachr's user avatar
  • 5,978
0 votes
1 answer
46 views

Add special character in keyname in Json, while sending json to api using retrofit Android

I am using retrofit for api call and Moshi, and for request one of key name is having a special character @ and when making the request its getting removed by Moshi or retrofit and getting missing key ...
Danial clarc's user avatar
0 votes
2 answers
539 views

How to ignore some fields in API response - Retrofit @GET

I have a get API call. and the response is like this: { "id": "22222", "resourceUri": "ssss", "xxx": null, "xxx": [...
sina .s's user avatar
  • 89
1 vote
0 answers
140 views

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. fault

dependencies { implementation 'androidx.appcompat:appcompat:1.4.2' implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2....
bett's user avatar
  • 11
0 votes
0 answers
448 views

how to change json order in retrofit android?

I'm using retrofit library to post json data from my app to the server but the json key order i'm getting is not the order i want how to change it? here's my retrofit postdata method where i have used ...
Niranjan Adhav's user avatar
0 votes
1 answer
361 views

IllegalArgumentException: Unable to create @Body converter for class

Whenever I try to create a request with Retrofit it fails. The strange thing is that it worked before, I didn't change anything about the code. Now months later it doesn't work anymore. I'm getting ...
UnfixedHash's user avatar
-1 votes
2 answers
114 views

Error in getting gson while using Get Method in Retrofit [duplicate]

I don't understand all thing I have set in String. but still got this problem. when I test my web API got no issue on this thing.. but when I implement got this problem.. here my error com.google.gson....
Nurul Nabila Mahadi's user avatar
0 votes
0 answers
1k views

Retrofit Android Api Call Show Blank Activity

I was try to consume a Nested JSON API with Retrofit and GSON. The code has no error. But the problem is it's show blank Activity when i run the application. I used AndroidX layout for layout_activity,...
TANBHIR HOSSAIN Spring 21's user avatar
0 votes
1 answer
2k views

java.text.ParseException: Failed to parse date ["2021-05-03 18:01:42"]: Invalid time zone indicator ' '

My Android Program use retrofit and Gson, Backend send me the response is "createTime":"2021-05-03 18:01:42", when I use Date type, there is a error show: com.google.gson....
Jun Shi Yan's user avatar
0 votes
2 answers
123 views

JSON onResponse - List will not populate with data

I am getting a working app (kinda). It is meant to populate the screen from a request for JSON data. I thought what I have so far would work but I guess not. onResponse does not seem to ever be called ...
Francesca Infranca's user avatar
0 votes
1 answer
671 views

handle 2 different error response for success and failer retrofit2

My current success response is this: {"status":"success","message":"msg here"} with code 200 And my error response is this: {"status":"failure&...
Hossam Hassan's user avatar
-1 votes
1 answer
322 views

I can't get the anime list from Kitsu Api with retrofit

I get this error: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 1 column 10 path $.data https://kitsu.io/api/edge/anime ...
Eloi Axol's user avatar
0 votes
0 answers
131 views

how to have gson expect an array of arrays of objects?

Expected BEGIN_OBJECT but was BEGIN_ARRAY I get this error because gson expects an object but since response from API starts with array it throws error. I 've looked at many answers on these questions ...
anton broos's user avatar

15 30 50 per page
1
2 3 4 5
15