Hi,
I have a question on marshalling mechanics of @XmlIDREF. I have these two
classes Assignment and Project and are able to marshal and unmarshal them
with CXF default configuration just nicely.
public class Assignment {
Project project;
int position;
@XmlIDREF
@XmlAttribute
public Project getProject() {
return project;
}
public int getPosition() {
return position;
}
}
public class Project {
String id;
@XmlID
public String getId() {
return id;
}
}
JSON looks like this:
{"assignment":{"@project":"123","position":567}},
{"project":{"id":"123",...}}
But, the question is - how do I control how the @XmlIDREF is represented in
marshaled JSON message. Currently it is marshalled as "@project":"123". What
if we would like to marshall it as "$project":"123"? So that it look like
this:
{"assignment":{"$project":"123","position":567}},
{"project":{"id":"123",...}}
Thanks
Reinis
--
View this message in context:
http://cxf.547215.n5.nabble.com/JSON-marshalling-of-XmlIDRef-tp5722641.html
Sent from the cxf-user mailing list archive at Nabble.com.