If I take out this line:
@Consumes(MediaType.APPLICATION_JSON)
...don't set Content-Type on the AJAX call, and change the createUser method
to this:
public String createUser(@QueryParam("user") String userJSON) {
try {
ObjectMapper mapper = new ObjectMapper();
User userBean = mapper.readValue(userJSON, User.class);
This works just fine. So Jackson can convert from JSON to the User class
without any annotations. What I want is for TomEE to call Jackson and do
this automatically.
--
View this message in context:
http://openejb.979440.n4.nabble.com/Trying-to-read-JSON-using-Jackson-in-TomEE-tp4668215p4668216.html
Sent from the OpenEJB User mailing list archive at Nabble.com.