|
From: ravi <mou...@gm...> - 2009-12-01 13:59:17
|
Hello,
I have the following problem, can you please let me know how to fix it.
I have the following object as DTO which will be sent to the user as
response.
public class myDTO {
private String name;
private Map<String, String> attributes;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Map<String, String> getAttributes() {
return this.attributes;
}
public void setAttributes(Map<String, String> attributes) {
this.attributes = attributes;
}
}
For the above DTO, the JSON response looks like:
entry: {
"name": "test",
"attributes" : {
entry : {
[
{"key":"test11","value":"value11"},
{"key":"test13","value":"value13"}
]
}
}
}
But I want my attributes to be returned as:
attribtues : {
test11: "value11",
test12: "value12"
}
Is there any way I could do this? I am using default providers.
thanks in advance
ravi
|