Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mapping Json Array using Jackson/Dropwizard  RSS feed

 
Conor Graham
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am currently working on a REST client where I am trying to get back some Json. I am using Dropwizard which uses Jackson, that so far I have found very useful to map to my java objects. For example:


This works fine and when I call my object.getId() I get the value of the Json object id. Now, my problem is that I want to access an object inside a JSON array.

So my JSON is like the following:




But how can I access the object "message" which is inside the commits array. I understand that with Jackson it returns an ArrayList, but I am not sure how to implement it into my code.

Any help would be much appreciated!
 
Tim Cooke
Marshal
Posts: 3652
184
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Conor, did you ever get this working? If so, how did you do it?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!