On Mon, May 14, 2012 at 12:32 PM, Julien Dreux <jdreux_at_justlexit.com> wrote:
> Here's how I am doing it. This works, I see the JSON generated, but the
> output is still in a bad format:
>
Right. It seems to me that with this:
> @Provider
>
> public abstract class AbstractBusinessServices extends Application
> implements ContextResolver<JacksonJsonProvider>,
>
> ExceptionMapper<Exception>{
>
> private JacksonJsonProvider context;
>
> private Class[] types;
>
>
> private Logger logger =
> LoggerFactory.getLogger(AbstractBusinessServices.class.getName());
>
>
> public AbstractBusinessServices() {
you should just add something like:
@Override
public Set<Object> getSingletons() {
Set<Object> s = new HashSet<Object>();
s.add(new JacksonJsonProvider());
return s;
}
to add the provider, and things would work...
-+ Tatu +-