You are asking Jackson to parse a StudentList. Tell it to parse a List (of students) instead. Since List is generic you will typically use a TypeReference

List<Student> participantJsonList = mapper.readValue(jsonString, new TypeReference<List<Student>>(){});
Answer from Manos Nikolaidis on Stack Overflow
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-can-we-convert-a-json-array-to-a-list-using-jackson-in-java
How can we convert a JSON array to a list using Jackson in Java?\\n
June 5, 2025 - import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.List; import java.io.IOException; import java.util.ArrayList; public class JsonArrayToList{ public static void main(String[] args) { String jsonArray = "[{"name":"John","age":30},{"name":"Jane","age":25}]"; ObjectMapper objectMapper = new ObjectMapper(); try { List<Person> personList = objectMapper.readValue(jsonArray, new TypeReference<List<Person>>(){}); for (Person person : personList) { System.out.println("Name: " + person.getName() + ", Age: " + person.getAge()); } }
๐ŸŒ
Javatpoint
javatpoint.com โ€บ how-to-convert-json-array-to-arraylist-in-java
How to Convert JSON Array to ArrayList in Java - Javatpoint
How to Convert JSON Array to ArrayList in Java with java tutorial, features, history, variables, object, programs, operators, oops concept, array, string, map, math, methods, examples etc.
Discussions

android - Convert JSON String to List of Java Objects - Stack Overflow
The main idea is to populate each JSON object into the Java Class then into an array of SomeObject. More on stackoverflow.com
๐ŸŒ stackoverflow.com
January 13, 2018
How to convert list data into json in java - Stack Overflow
I have a function which is returning Data as List in java class. Now as per my need, I have to convert it into Json Format. Below is my function code snippet: public static List More on stackoverflow.com
๐ŸŒ stackoverflow.com
Convert JSON data to a list of Java objects - Stack Overflow
I have a Java class and I want to convert this JSON to a list of instances of my class. I found how to convert a single object, but not a list. More on stackoverflow.com
๐ŸŒ stackoverflow.com
March 24, 2014
Convert this JSON data to list of objects in Java - Stack Overflow
Communities for your favorite technologies. Explore all Collectives ยท Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work More on stackoverflow.com
๐ŸŒ stackoverflow.com
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ json โ€บ jackson โ€บ convert json array to java list
Convert JSON Array to Java List | Baeldung
August 13, 2025 - Then, we use the fromJson() method of the Gson object to convert the JSON array String to a List. Since weโ€™ve converted JSON array to a List, letโ€™s also try to analyze the assertion.
๐ŸŒ
Makeinjava
makeinjava.com โ€บ home โ€บ convert list of objects to/from json in java (jackson objectmapper/ example)
Convert list of objects to/from JSON in java (jackson objectmapper/example)
January 1, 2024 - We will use the jacksonโ€™s objectmapper, to serialize list of objects to JSON & deserialize JSON to List of objects. We will create Person class & we will perform following operations with Person class. ... Convert the JSON to List of Person objects.
๐ŸŒ
Attacomsian
attacomsian.com โ€บ blog โ€บ jackson-convert-json-array-to-from-java-list
Convert JSON array to a list using Jackson in Java
November 6, 2022 - Now we can use the readValue() method from the ObjectMapper class to transform the above JSON array to a list of User objects, as shown below: try { // JSON array String json = "[{\"name\":\"John Doe\",\"email\":\"john.doe@example.com\"," + ...
๐ŸŒ
How to do in Java
howtodoinjava.com โ€บ home โ€บ convert json array to list: gson, jackson and org.json
Convert JSON Array to List: Gson, Jackson and Org.json
September 25, 2023 - The following code parses a JSON array containing person data and converts it into a list of Java Person objects using the JSONArray and JSONObject classes.
Find elsewhere
๐ŸŒ
Stack Abuse
stackabuse.com โ€บ converting-json-array-to-a-java-array-or-list
Convert JSON Array to a Java Array or List with Jackson
September 8, 2020 - Using Jackson's ObjectMapper class, it's easy to read values and map them to an object, or an array of objects. We just use the readValue() method, passing the JSON contents and the class we'd like to map to.
๐ŸŒ
Mkyong
mkyong.com โ€บ home โ€บ java โ€บ how to parse json array with jackson
How to parse JSON Array with Jackson - Mkyong.com
April 23, 2024 - The technique is the same with the above example 4: first converts the JSON string to Map<String, List<Person>> and manually get the List<Person> later. { "Person" : [ { "name" : "mkyong", "age" : 42 }, { "name" : "ah pig", "age" : 20 } ] } ... package com.mkyong.json.jackson; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.mkyong.json.model.Person; import java.util.List; import java.util.Map; public class JsonArrayToObjectExample4 { public static void main(String[] a
๐ŸŒ
HowToDoInJava
howtodoinjava.com โ€บ home โ€บ gson โ€บ gson โ€“ parse json array to java array or list
Gson - Parse JSON Array to Java Array or List
April 4, 2023 - Here ArrayItem is the class type of data elements in the array. ArrayItem[] userArray = new Gson().fromJson(jsonSource, ArrayItem[].class); For converting such JSON array to a List, we need to use TypeToken class.
Top answer
1 of 5
1

Your input string should be as follows to qualify for a list of SomeObject

{
    [{
            "k1": 1,
            "k2": "v2",
            "k3": "v3"
        }, {
            "k1": 2,
            "k2": "v2",
            "k3": "v3"
        }
    ]
}

Below code should work ..

JSONObject jsonObject = new JSONObject(jsonString);
SomeObject[] objectsList = gson.fromJson(jsonObject.toString(), SomeObject[].class);

For given JSON String here you can handle this way (add toString() to SomeObject for displaying it)...

import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;

public class TestClass {

    public static void main(String[] args) {
        List<SomeObject> list = new LinkedList<SomeObject>();
        String jsonString = "{\"obj_1\":{\"k1\":1,\"k2\":\"v2\",\"k3\":\"v3\"},\"obj_2\":{\"k1\":2,\"k2\":\"v2\",\"k3\":\"v3\"}}";
        Gson gson = new Gson();
        JsonObject jsonObject = new JsonParser().parse(jsonString).getAsJsonObject();
        for (Entry<String, JsonElement> entry : jsonObject.entrySet()) {
            // note entry.getKey() will be obj_1, obj_2, etc.
            SomeObject item = gson.fromJson(entry.getValue().getAsJsonObject(), SomeObject.class);
            list.add(item);
        }
        System.out.println(list);
    }
}

Sample Run

[SomeObject [k1=1, k2=v2, k3=v3], SomeObject [k1=2, k2=v2, k3=v3]]

NOTE: the value of k1 must be a number and without quotes as k1 is declared as int in SomeObject

2 of 5
0

Your JSON structure is a Map, if you want an array or list use [ { } , {} ] it is the structure in JSON for array or list

๐ŸŒ
Java Tech Blog
javanexus.com โ€บ blog โ€บ converting-json-array-to-java-list-gson-nested-objects
Converting JSON Array to Java List with Gson: Handling Nested Objects | Java Tech Blog
May 9, 2024 - Learn how to seamlessly convert complex nested JSON arrays into Java Lists using Gson. Master JSON handling in Java!
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ convert-a-list-of-objects-to-json-using-the-gson-library-in-java
Convert a list of objects to JSON using the Gson library in Java?
April 22, 2025 - Then, create a list of objects. Then we will create an instance of Gson class. Next, we will convert the list to JSON using the toJsonTree() method of Gson.
๐ŸŒ
Java Code Geeks
javacodegeeks.com โ€บ home โ€บ core java
Converting JSON Array to Java List with Gson - Java Code Geeks
April 25, 2024 - We parse a JSON array into a JsonArray using Gsonโ€™s JsonParser. Then, we iterate over each element of the array, converting them into Java objects using Gsonโ€™s fromJson() method. Finally, we add each Java object to a List.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ java โ€บ how-to-convert-json-array-object-to-java-object
How to Convert JSON Array Object to Java Object? - GeeksforGeeks
July 23, 2025 - We have created an ObjectMapper instance from the Jackson library, which helps with JSON processing. We have used the readValue() method of the ObjectMapper to convert the JSON string into an array of User objects.
๐ŸŒ
Quora
quora.com โ€บ How-do-I-convert-a-list-to-JSON-in-Java
How to convert a list to JSON in Java - Quora
Answer (1 of 8): Just use ObjectMapper from fasterxml library. [code]import com.fasterxml.jackson.databind.ObjectMapper; ObjectMapper mapper = new ObjectMapper(); String jsonString = mapper.writeValueAsString(anyObject); [/code]