Jersey使用数组消耗json对象

时间:2012-05-16 11:14:38

标签: java rest collections jersey

我有一个发送此json {"girid":2446000008,"esqid":2446,"type":"GRAPH_DATA_NODES","posOriginal":[-39130,9883620],"posFinal":[-39224.49077119721,9883578.56429682]}

的webapp

并在REST服务中

public Response editObject(@PathParam("id") Long idDiagram, EditedObject obj) {

我想将此对象编组为POJO

@XmlRootElement
public class EditedObject
{
    private Long girid;
    private Long esqid;
    private String type;
    private ArrayList<Double> posOriginal;
    private ArrayList<Double> posFinal;
    private Double rotOriginal;
    private Double rotFinal;
    private Double fontSize;

,除了最终结果为空的两个ArrayList

之外没关系
EditedObject [girid=2446000008, esqid=2446, type=GRAPH_DATA_NODES, posOriginal=null, posFinal=null, rotOriginal=null, rotFinal=null, fontSize=null]

我如何编组收藏?

0 个答案:

没有答案