Deserializes JSON String into Java object using JSON.parseObject() with Fastjson

Tags: JSON fastjson

Java Code Examples for

This method to deserializes the JSON string into a Java object.

Adding Fastjson dependency into your project

Using Gradle

compile group: '', name: 'fastjson', version: '1.2.56'

Using Maven


How to use



import java.util.List;
import java.util.Map;

public class JSONParseObjectExamples {

    public static void main(String... args) {
        String data = "[{\"name\":\"Sample JSON Serialization\",\"url\":\"\"},{\"name\":\"Java Tutorials\",\"url\":\"\"}]";
        List<Map<String, String>> objectFromJsonString = JSON.parseObject(data, List.class);
        System.out.println("Object from String: " + objectFromJsonString);


Happy Coding 😊