I would like to ask you guys how to deserialize nested object with jackson. I got example Json File:
{ "id": "1", "comment": "Some comment", "user": "Smith", "date": "2018-05-31", "shape": "oval", "coordinates": [ ["50", "130"], ["370", "500"] ] }, Let's say that main Class is called Comment, but I would like to create another class Coordinates with local variables x1, x2, y1, y2. So class Comment looks like that:
public class CommentFile implements Serializable{ private Long id; private String comment; private String user; private String date; private String shape; private Coordinates coordinates; //setters, getters, constructor But because in json i have 'array' "coordinates": [ ["50", "130"], ["370", "500"] ], i dont know how to convert this to:
public class Coordinates implements Serializable{ private double x1; private double y1; private double x2; private double y2; Any ideas?