This example will demonstrate how to convert a json array to a java ArrayList using jackson JSON parser. In the set up, we will create a sample class NavItem and a json array to represent navigation elements.
Setup
Sample java class
Sample json array
Jackson
First we will create an ObjectMapper, a class that provides the ability to convert between java and json, to deserialize json to java ArrayList. Next calling ObjectMapper.readValue passing json and call a method that creates a collection of a specified NavItem type.