我正在尝试将POJO映射到我得到的JSON响应;但是,我不断收到此错误:com.fasterxml.jackson.databind.exc.InvalidTypeIdException: Could not resolve type id ‘order’ as a subtype of `com.issbou.entity.OrdersList`: known type ids = [orders]
我从服务器得到的并且试图映射到我的POJO类的Json响应是:{
“orders”: [
{
“id”: 2039665099999,
“email”: “isx@gmail.com”
},
{
“id”: 2039665066666,
“email”: “yzy@gmail.com”
}
]
}
Order:表示单个订单的Java实体类:import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class Order {
@JsonProperty(“id”)
private long id;
@JsonProperty(“email”)
private