RESTEasy - simple string array/collection marshalling
Posted
by peperg
on Stack Overflow
See other posts from Stack Overflow
or by peperg
Published on 2010-05-20T08:06:53Z
Indexed on
2010/05/20
8:10 UTC
Read the original article
Hit count: 496
resteasy
Is there a simple way for marshalling and unmarshalling String[] or List in RESTEasy?
My code sample :
@GET
@Path("/getSomething")
@Produces(MediaType.APPLICATION_JSON)
public List<String> getSomeData() {
return Arrays.asList("a","b","c","d");
}
Above gives me an Exception :
Could not find MessageBodyWriter for response object
of type: java.util.Arrays$ArrayList of media type: application/json
© Stack Overflow or respective owner