It all depends on what you are asking for the type of result: if you request data for display on a LinkedHashSet , then the JSON Array maps to it. If you use an undefined type of type java.lang.Object (or java.util.Collection ), you will get an ArrayList for JSON arrays. Keep in mind that JSON is data, not objects (by default), so metadata for the Java types you use is not passed by default. There are ways to do this if you need it, but usually you just need to provide the expected type.
source share