For anyone else who might need this:

String jsonString = "[\"string1\",\"string2\",\"string3\"]";
ObjectMapper mapper = new ObjectMapper();
List<String> strings = mapper.readValue(jsonString, List.class);
Answer from Artemio Ramirez on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › java › how-to-convert-json-array-to-string-array-in-java
How to Convert JSON Array to String Array in Java? - GeeksforGeeks
July 23, 2025 - List<String> exampleList = new ArrayList<String>(); ... We can loop through the JSON array to add all elements to our List.
🌐
Blogger
javarevisited.blogspot.com › 2013 › 04 › convert-json-array-to-string-array-list-java-from.html
How to Convert JSON array to String array in Java - GSon example
This Java example uses the GSON library to create a List of String from JSON array and further Java standard library to convert List to an array. Instead of declaring JSON array in Code, which we did here for demonstration purposes, you can also read input from a file, database, or any URL.
🌐
Adambien
adambien.blog › roller › abien › entry › list_string_to_jsonarray_conversion
List<String> to JsonArray Conversion with JSON-P and Java EE 8
January 10, 2019 - List<String> can be converted into JsonArray with: import javax.json.Json; import javax.json.JsonArray; import javax.json.stream.JsonCollectors; import org.junit.jupiter.api.Test; public class StringListToJsonArrayTest { @Test public void conversion() { JsonArray jsonStringArray = Arrays.asList("duke", "duchess").
🌐
Mkyong
mkyong.com › home › java › how to parse json array with jackson
How to parse JSON Array with Jackson - Mkyong.com
April 23, 2024 - package com.mkyong.json.jackson; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.mkyong.json.model.Person; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public class JsonArrayToObjectExample3 { public static void main(String[] args) throws JsonProcessingException { // Create a list of Person objects List<Person> people = Arrays.asList( new Person("mkyong", 42), new Person("ah pig", 20) ); // Wrap the list in a Map with "Person" as the key Map<String, List<Person>> wrapper
Find elsewhere
🌐
GitHub
github.com › eclipse-ee4j › jersey › issues › 4486
Consuming JSON list of strings sent via POST · Issue #4486 · eclipse-ee4j/jersey
May 22, 2020 - And assuming that a valid request with Content-type: application/json is received by Jersey, with the body something like ["a", "b"] -- in other words, a JSON list of strings -- what is the easiest way to have Jersey automagically parse the body into a parameter for the function? I tried adding List<String> foos as a parameter, i.e.: public Response SomeFunction(List<String> foos, @Context HttpServletRequest request) { ... Cannot deserialize instance of java.util.ArrayList out of VALUE_STRING token at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 1]
Published   May 22, 2020
Author   shaggyfrog
🌐
TutorialsPoint
tutorialspoint.com › how-can-we-convert-a-list-to-the-json-array-in-java
How can we convert a list to the JSON array in Java?
April 22, 2025 - If you are using Maven, add this to your pom.xml file: <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20210307</version> </dependency> Steps to convert a list to a JSON array using the org.json library: First, import the org.json.JSONArray class.
🌐
Baeldung
baeldung.com › home › java › java list › converting a java list to a json array
Converting a Java List to a Json Array | Baeldung
June 18, 2025 - Furthermore, web services and APIs often rely on JSON format to provide public data in a standardized manner. Its versatility makes it compatible with modern programming languages, allowing seamless integration across different platforms and technologies. In this scenario, let’s consider a Java list named “articles” that contains elements as follows: public List<String> list = Arrays.asList("Article 1", "Article 2", "Article 3"); public String expectedJsonArray = "[\"Article 1\",\"Article 2\",\"Article 3\"]";
🌐
Stack Exchange
salesforce.stackexchange.com › questions › 375426 › json-array-string-into-list
apex - JSON Array String into List - Salesforce Stack Exchange
May 6, 2022 - Bring the best of human thought and AI automation together at your work. Explore Stack Internal ... String stringJSON = '[{"action":"ASSIGN","value":"Router"},{"action":"DISABLE","value":true},{"action":"HIDE","value":false}]'; Can anyone help how do I convert this JSON string into List of Map?
🌐
GeeksforGeeks
geeksforgeeks.org › java › convert-an-arraylist-into-a-json-string-in-java
How to Convert an ArrayList into a JSON String in Java? - GeeksforGeeks
July 23, 2025 - package org.example; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.ArrayList; public class Main { public static void main(String[] args) { // Create an ArrayList ArrayList<String> courses = new ArrayList<>(); courses.add("Java"); courses.add("Python"); courses.add("C++"); // Convert ArrayList to JSON string ObjectMapper objectMapper = new ObjectMapper(); try { String jsonString = objectMapper.writeValueAsString(courses); // Print JSON string System.out.println(jsonString); } catch (JsonProcessingException e) { e.printStackTrace(); } } } It creates an ArrayList of type String and adds 3 course names to it.
🌐
Baeldung
baeldung.com › home › json › jackson › convert json array to java list
Convert JSON Array to Java List | Baeldung
August 13, 2025 - We can specify the type of the target List using the TypeToken class. In the above example, we’ve defined the target type as List<Product>. Then, we use the fromJson() method of the Gson object to convert the JSON array String to a List.
🌐
Google Groups
groups.google.com › g › vertx › c › 5fgz-e2rTbk
casting a JsonArray to a specific type
Also, if you're using Java 8 you can make the List to List<String> conversion a little prettier with the stream API. Something like... List<String> list = array.toList().stream().collect(Collectors.mapping(value -> value.toString()), Collectors::toList); Might have that a little wrong since I typed that from my phone :-) On Dec 28, 2014, at 3:23 PM, Alexander Lehmann <alex...@gmail.com> wrote: I wonder if there is a smarter way to cast a JsonArray to a List of specific type.
🌐
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 - Following is the code that provides an example of how to convert a JSON array to a list using Jackson in Java: 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 (Pe
🌐
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 - We don't always deal with JSON in String format. Oftentimes, the contents come from a File. Thankfully, Jackson makes this task as easy as the last one, we just provide the File to the readValue() method: final ObjectMapper objectMapper = new ObjectMapper(); List<Language> langList = objectMapper.readValue( new File("langs.json"), new TypeReference<List<Language>>(){}); langList.forEach(x -> System.out.println(x.toString())); ... [ { "name": "Java", "description": "Java is a class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible."