cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable JSON response in WebEngine ?

yginieys_
Champ in-the-making
Champ in-the-making

Hello,

I would like to return JSON response from WebEngine with something like :

@Produces("application/json")
@GET
@Path("/json")
public Customer getCustomer(@PathParam("customerId") String id) {
  return new Customer("John", "Doe");
}

This throws a :

2012-09-24 10:27:17,848 ERROR [com.sun.jersey.spi.container.ContainerResponse] A message body writer for Java type, class org.mycompany.Customer, and MIME media type, application/json, was not found.

How can I define such body writer ? Nuxeo5.5 includes the Jackson JSON library that fits this need. Is it integrated in WebEngine ? Thanks,

0 REPLIES 0
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.