skip to Main Content

Needed to filter null values from JSON response in spring boot project

public class APIService { private List<CoinDTO> coinList = new ArrayList<>(); private final TrackerConfigProperties trackerConfig; //Injecting configuration properties into the constructor. public APIService(TrackerConfigProperties trackerConfig) { this.trackerConfig = trackerConfig; } public List<CoinDTO> getCoinList() { return coinList; } public void setCoinList(List<CoinDTO> coinList) {…

VIEW QUESTION

Mongodb – okhttp not sending header on post request

I am trying to send a simple post request to MongoDB using okhttp. Here is the code that I am working with: try { String jsonStr = om.writeValueAsString(postRequest); RequestBody body = RequestBody.create( jsonStr, MediaType.parse("application/json; charset=utf-8")); // also attempted with MediaType.parse("application/json")…

VIEW QUESTION

Android Studio – Retrofit response body filed retun null, but logging interceptor showing full response in logact

I am using retrofit2.6.2 for api call. LoggingInterceptor showing full response in logcat but retrofit response body return null. I didn't figure out where is my problem. My json data schema is { "error":false, "msg":"Banner Found", "id":"9", "activity":"VipPremium1", "imageUrl":"https://1.bp.blogspot.com/-Kh3RQlJH7Xw/X-1mIPi7_HI/AAAAAAAAFME/Y2bCnU5odngcdDT83uC9QwUr7IGJdTDfACLcBGAsYHQ/s2616/COMPRESSED_IMG_1609393684674.jpg", "actionUrl":"https://www.youtube.com/watch?v=ukJX5ZgJec4",…

VIEW QUESTION
Back To Top
Search