I have a restful web service, and the response is:
{
\"cities\": [{
\"id\": \"1\",
\"name\": \"City 01\",
\"state\": \"A1\"
}
Good question. I have had an requirement similar to this. I had to have access to the generated raw response and do some manipulation. I achieved that by registering a resonse filter and then adapt a custom reponsewriter. See link below for more details.
http://www.mentby.com/paul-sandoz/access-to-raw-xml-in-jersey.html
In your response filter, you could clip out the class name from generated json, or better yet, return String in response and use custom json serialization mechanism like Google-gson.
Let me know if this solution works.