Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4802

Mapping API to class, Large api only want to display certain feilds

$
0
0

enter image description hereI am trying to create an app that takes in information from a third party API stock detail. I created a pojo and tried to map the properties from the api call to the class and get a list to json incompatibility. I dont have much experience with api calls so I am confused on how normally we would go about mapping the response to my class [enter image description here](https://i.sstatic.net/fPzMPR6t.png). My second question is that if i have a api call that pulls 10 properties and I only want 1 is there a way to request that sole property? If not are there any options aside from mapping all 10 feilds to my pojo then doing whatever with that one piece of data or parsing the json(would also like to know best practices for this option)

I havent been able to understand the object mapping ive seen online so far and was hoping someone can shed some light on what I am mistaken on


Viewing all articles
Browse latest Browse all 4802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>