Introduction

In this article, we’ll convert a JSON array into a Java Array and Java List using Jackson.

Since we’re using Jackson, you’ll have to add it to your project. If you’re using Maven, it’s as easy as adding the dependency:

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.11.2</version>
</dependency>

Or, if you’re using Gradle:

compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.11.2'

#java #json #jackson

Convert JSON Array to a Java Array or List with Jackson
4.25 GEEK