Skip to main content
Remove rant
Source Link
Jacob van Lingen
  • 9.7k
  • 8
  • 56
  • 88

I am using REST web service/Apache Wink with Jackson 1.6.2 REST web service/Apache Wink

. How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;} 

The Jackson docs state that it can do this via @JsonValue/@JsonCreator but provides no examples (how helpful!). I'm sure they just don't want too many people using their framework so they are keeping this secret.

Anyone willing to spill the (java)beans, as it were?

Jackson 1.6.2 REST web service/Apache Wink

How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;} 

The Jackson docs state that it can do this via @JsonValue/@JsonCreator but provides no examples (how helpful!). I'm sure they just don't want too many people using their framework so they are keeping this secret.

Anyone willing to spill the (java)beans, as it were?

I am using REST web service/Apache Wink with Jackson 1.6.2. How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;} 

The Jackson docs state that it can do this via @JsonValue/@JsonCreator but provides no examples.

Anyone willing to spill the (java)beans, as it were?

formatting
Source Link

Jackson 1.6.2 REST web service/Apache Wink

How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;}

BooleanField locked; public BooleanField getLocked() {return locked;} 

The Jackson docs state that it can do this via @JsonValue@JsonValue/@JsonCreator@JsonCreator but provides no examples (how helpful!). I'm sure they just don't want too many people using their framework so they are keeping this secret.

Anyone willing to spill the (java)beans, as it were?

Jackson 1.6.2 REST web service/Apache Wink

How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;}

The Jackson docs state that it can do this via @JsonValue/@JsonCreator but provides no examples (how helpful!). I'm sure they just don't want too many people using their framework so they are keeping this secret.

Anyone willing to spill the (java)beans, as it were?

Jackson 1.6.2 REST web service/Apache Wink

How do I annotate an enum field so that Jackson deserializes it?

Inner class

public enum BooleanField { BOOLEAN_TRUE { public String value() { return "1";} }, BOOLEAN_FALSE { public String value() { return "0";} }, 

Java Bean/Request object

BooleanField locked; public BooleanField getLocked() {return locked;} 

The Jackson docs state that it can do this via @JsonValue/@JsonCreator but provides no examples (how helpful!). I'm sure they just don't want too many people using their framework so they are keeping this secret.

Anyone willing to spill the (java)beans, as it were?

edited tags
Link
Will Hartung
  • 119.4k
  • 20
  • 134
  • 209
Source Link
rakehell
  • 509
  • 1
  • 4
  • 7
Loading