I'm trying to return a List from jersey, which works fine in XML, but when I go to output it as JSON, it claims, "A message body writer for Java class ... and Java type ... and MIME media type application/json was not found".
I have not done any configuration for dealing with utility lists, as i thought that jersey + jersey-json-1.9 handled this stuff automagically for JSON the same way it has for XML.
Anyone else have any luck with this?
I found that my first stab at this same problem failed with this error message, and the solution was as given in another SO question, Jersey: com.sun.jersey.server.impl.template.ViewableMessageBodyWriter: I had forgotten to add the jersey-json module to my project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With