RESTEasy - einfache string-array/collection marshalling

Gibt es eine einfache Möglichkeit für marshalling und unmarshalling String[] oder List in RESTEasy?

Mein code-Beispiel :

@GET
@Path("/getSomething")
@Produces(MediaType.APPLICATION_JSON)
public List<String> getSomeData() {
    return Arrays.asList("a","b","c","d");

}

Oben gibt mir eine Ausnahme :

Could not find MessageBodyWriter for response object 
of type: java.util.Arrays$ArrayList of media type: application/json
Schreibe einen Kommentar