DeSerialization Custom Object

Hello! I have this rest request to my Camunda App:

{
    "messageName": "WaitingUserList",
    "businessKey": "186",
    "processVariables": {
        "userList": {
            "value": [
                {
                    "id": 2,
                    "name": "Tim",
                    "value": "TEST_DATA1"
                },
                {
                    "id": 6,
                    "name": "John",
                    "value": "TEST_DATA2"
                },
                {
                    "id": 5,
                    "name": "Vasya",
                    "value": "TEST_DATA3"
                }
            ]
        }
    }
}

I can’t deserialize an object with this code.

ArrayList<User> userList = (ArrayList<User>) execution.getVariable("userList");

Because kamunda deserilizes the User.class like LinkedHashMap and when I use this variable I have:

java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.test.models.dto.UserDto (java.util.LinkedHashMap is in module java.base of loader &#39;bootstrap&#39;; org.test.models.dto.UserDto is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @2556c252)

How does these 2 classes looks like?

I am sorry.
This doesn’t solve the problem, it’s just my mistake.

Correct deserialize:

ArrayList<UseDto> userList = (ArrayList<UserDto>) execution.getVariable("userList");

UseDto:

@Data
@ToString
@EqualsAndHashCode(of = {"id","name"})
@JsonIgnoreProperties(ignoreUnknown = true)
public class UserDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;
    private String name;
    private String value;
}