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
๐ŸŒ
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.
๐ŸŒ
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 - In the provided code snippet, we instantiate the ObjectMapper class and utilize its writeValueAsString() method. This method allows us to convert the articles List into a JSON array, which is then represented as a string.
๐ŸŒ
Adam-bien
adam-bien.com โ€บ roller โ€บ abien โ€บ entry โ€บ list_string_to_jsonarray_conversion
List to JsonArray Conversion with JSON-P and Java EE 8
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").
๐ŸŒ
TutorialsPoint
tutorialspoint.com โ€บ how-can-we-convert-a-list-to-the-json-array-in-java
How to convert a List to JSON array using the Jackson library in Java?
April 22, 2025 - This method is particularly useful when you want to save the JSON output to an external location such as a file system or a network stream. import java.util.*; import java.io.File; import com.fasterxml.jackson.databind.ObjectMapper; public class ListToJSONArrayTest { public static void main(String[] args) { List < String > list = new ArrayList < > (); list.add("JAVA"); list.add("PYTHON"); list.add("SCALA"); list.add(".NET"); list.add("TESTING"); ObjectMapper objectMapper = new ObjectMapper(); try { // Writing the list directly into a JSON file objectMapper.writeValue(new File("list.json"), list); System.out.println("JSON array has been written to list.json file."); } catch (Exception e) { e.printStackTrace(); } } }
๐ŸŒ
Baeldung
baeldung.com โ€บ home โ€บ json โ€บ jackson โ€บ convert json array to java list
Convert JSON Array to Java List | Baeldung
August 13, 2025 - Since weโ€™ve converted JSON array ... field, such as ID or description, in the String JSON array to the converted gsonList, which represents a List of Product class. Jackson is another widely-used JSON library for Java....
๐ŸŒ
Quora
quora.com โ€บ How-do-I-convert-a-list-to-JSON-in-Java
How to convert a list to JSON in Java - Quora
Quora is a place to gain and share knowledge. It's a platform to ask questions and connect with people who contribute unique insights and quality answers.
Find elsewhere
๐ŸŒ
Java Guides
javaguides.net โ€บ 2019 โ€บ 07 โ€บ convert-list-to-json-array-using-jackson.html
Convert List to JSON Array Using Jackson
July 21, 2019 - ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); List < String > progLangs = new ArrayList < > (); progLangs.add("C"); progLangs.add("C++"); progLangs.add("Java"); progLangs.add("Java EE"); progLangs.add("Python"); progLangs.add("Scala"); progLangs.add("JavaScript"); // Serialize Object to JSON.
๐ŸŒ
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 - JSON stands for JavaScript Object Notation. It is one of the widely used formats to exchange data by web applications. JSON arrays are almost the same as arrays in ยท JavaScript. They can be understood as a collection of data (strings, numbers, booleans) in an indexed manner.
๐ŸŒ
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.model; public class Person { private String name; private int age; public Person() { } public Person(String name, int age) { this.name = name; this.age = age; } // getters, setters, toString() } In Jackson, we can convert the JSON array to an Array or List. ... 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; public class JsonArrayToObjectExample { public static void main(String[] args) throws JsonProcessingException { String jsonArray = "[{\"name\":\"mkyong\", \"age\":42}, {\"name\":\"ah pig\", \"age\":20}]"; ObjectMapper mapper = new ObjectMapper(); // 1.
๐ŸŒ
YouTube
youtube.com โ€บ watch
How To Convert Java List Object Into JSON String using Jackson API | Java Inspires - YouTube
In this video, we will see how to convert(serialize) Java List Object into JSON String and vice versa means how to convert(deserialize) JSON String to Java ...
Published: June 7, 2021
๐ŸŒ
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 - In Java, an ArrayList is a resizable array implementation of the List interface. It implements the List interface and is the most commonly used implementation of List. In this article, we will learn how to convert an ArrayList into a JSON string in Java.