我想安排这堂课:
public class PrimCon {
private Object any;
public Object getAny() {
return any;
}
public void setAny(Object any) {
this.any = any;
}
}
用于编组:
PrimCon p= new PrimCon();
p.setAny("sdghedrseaengd");
marshaller.marshal(p, System.out);
Output is :
{
"any" : {
"type" : "string",
"val" : "sdghedrseaengd"
}
}
我的问题是如何在输出中删除“ type”:“ string”