jackson « jersey « Java Enterprise Q&A





1. How to generate JSON from a Jersey resource?    stackoverflow.com

I'm using Jersy and want to output the following JSON with only the fields listed:

[
    {
      "name": "Holidays",
      ...

2. Using Jackson as Jersey client serializer    stackoverflow.com

Is it possible to use Jackson as the serializer/marshaller for JSON data instead of JAXB when using Jersey Client API? If so how to configure it?

3. Is there any way to override or update Jersey's Jackson version?    stackoverflow.com

We're trying to use Jackson 1.5 to take advantage of some of the polymorphic handling it offers, but it appears that Jersey brings along it's own outdated version of Jackson (1.1.1). ...

4. Jersey + Jackson JSON date serialization format problem - how to change the format or use custom JacksonJsonProvider    stackoverflow.com

I am using Jersey + Jackson to provide REST JSON services layer for my application. The problem I have is that the default Date serialization format looks like that:

"CreationDate":1292236718456
At first i ...

5. Jersey + Jackson deserialization problem with date object    stackoverflow.com

I'm using jersey and jackson together to develop my REST API, and I'm having a problem when deserializing date string. I have register a provider class in Jersey:

@Provider
public class MyJsonProvider extends ...

6. Jackson + Builder Pattern?    stackoverflow.com

I'd like Jackson to deserialize a class with the following constructor:

public Clinic(String name, Address address)
Deserializing the first argument is easy. The problem is that Address is defined as:
public class Address
{
  ...

7. Configure Jersey/Jackson to NOT use @XmlElement field annotation for JSON field naming    stackoverflow.com

I am running a Jersey REST service. The POJO's which represent my resources are JAXB (XML) annotated simple Java classes (they are generated from a schema definition - so they have ...

8. Jersey GenericEntity Not Working    stackoverflow.com

I am using Jersey's GenericEntity to return a list as json. However I'm getting the exception

A message body writer for Java type, class java.util.Arrays$ArrayList, and MIME media type, application/xml, was ...

9. Jersey and Jackson serialization of subclasses does not include extra attributes    stackoverflow.com

In Jersey, when using Jackson for JSON serialization, the extra attributes of an implementing subclass are not included. For example, given the following class structure

@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.PROPERTY, property="@class")
@JsonSubTypes({
    ...





10. JSON ArrayList in Jersey    stackoverflow.com

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 ...

11. Jackson & Jettison usage in Jersey    stackoverflow.com

Jersey framework uses both Jackson and Jettison libraries for JSON unmarshalling/marshalling. AFAIK, Jettison is for for mapping JSON to XML (with ...