Announcement Announcement Module
No announcement yet.
List of Users from HttpResponse Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • List of Users from HttpResponse


    I have a HttpResponse Object.
    In this Object is a List of User (probaly Json) Objects.
    The Problem is, that I don't knwo how to get this information.

    A single User can be taken out with

    User user = new ObjectMapper().readValue(response.getEntity().getContent(), User.class);
    A List of users will probably taken out with

    List<User> users = new ObjectMapper().readValues(???);
    The method wants to have a JsonParser Object but I don't knwo how to get a JsonParser out of a inputStream.
    I also have the problem how to get the meta information. Also the total number of Users, the actual page (also for example Users 30-40) and so on.

    Hope someone has experience with this and can give a a good advice. I was looking with google but I could't find something useful.