|
From: Adrian M. <adr...@gm...> - 2013-08-23 12:02:49
|
Hi all! I'm using the resteasy that comes with jboss 7.2 (EAP 6 alpha). I
have a @GET method that produces application/json where i return an object
(JPA entity) which contains a String field with the username of the user
who created the object. However on the client i need to provide more
information - username and full name. Is there a way to configure some kind
of converter so from:
class MyClass {
String title;
String username;
}
i should produce:
{
"title" : "something",
"username" : "amitev"
"fullname" : "Adrian Mitev"
}
or
{
"title" : "something",
"user" : {
"username" : "amitev"
"fullname" : "Adrian Mitev"
}
}
|