<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to enable JSON response in WebEngine ? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-enable-json-response-in-webengine/m-p/323147#M10148</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to return JSON response from WebEngine with something like :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@Produces("application/json")
@GET
@Path("/json")
public Customer getCustomer(@PathParam("customerId") String id) {
  return new Customer("John", "Doe");
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This throws a :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;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.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How can I define such body writer ?
Nuxeo5.5 includes the Jackson JSON library that fits this need. Is it integrated in WebEngine ?
Thanks,&lt;/P&gt;</description>
    <pubDate>Mon, 24 Sep 2012 10:34:32 GMT</pubDate>
    <dc:creator>yginieys_</dc:creator>
    <dc:date>2012-09-24T10:34:32Z</dc:date>
    <item>
      <title>How to enable JSON response in WebEngine ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-enable-json-response-in-webengine/m-p/323147#M10148</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to return JSON response from WebEngine with something like :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@Produces("application/json")
@GET
@Path("/json")
public Customer getCustomer(@PathParam("customerId") String id) {
  return new Customer("John", "Doe");
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This throws a :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;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.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How can I define such body writer ?
Nuxeo5.5 includes the Jackson JSON library that fits this need. Is it integrated in WebEngine ?
Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 24 Sep 2012 10:34:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-enable-json-response-in-webengine/m-p/323147#M10148</guid>
      <dc:creator>yginieys_</dc:creator>
      <dc:date>2012-09-24T10:34:32Z</dc:date>
    </item>
  </channel>
</rss>

