Convert a JSON array to a List using Jackson

In this post we will provide an example of how to convert a JSON array to a List using Jackson.


In this example you will need to add the following dependancy

Convert a JSON array to a list:

The example below shows how to convert a JSON array to a java list using Jackson.

As you can see from the above example, the ObjectMapper class has a useful method readValue which takes a JSON string and converts it to the object class you specify as the 2nd argument (in this case a List)


Running the above code produces the following output

In conclusion I hope the you found this post useful

Similar posts:

  1. Convert a list to json array using Jackson
  2. How to convert a java object to json using Jackson
  3. How to parse JSON using Jackson
  4. How to parse a JSON string to a object using Jackson


  1. Jackson documentation


Leave a Reply

Your email address will not be published. Required fields are marked *