How to remove the type
from the JSON output that I have. I have a class/bean that contains output of a REST service.I'm using jersey-media-moxy
to do the conversion.
The service
@Resource
public interface MyBeanResource
{
@GET
@Path("/example")
@Produces( MediaType.APPLICATION_JSON )
public Bean getBean();
}
The Bean
@XmlRootElement
class Bean
{
String a;
}
I want to add some functionality (for initializing the bean using the constructor)
class BeanImpl extends Bean
{
BeanImpl(OtherClass c)
{
a = c.toString()
}
}
The outputted JSON is:
{type:"beanImpl", a:"somevalue"}
I do not want the type
in my JSON. How can I configure this?