Discussion:
custom parameter in Json object
Jordan Blay
2011-12-25 10:14:46 UTC
Permalink
I saw this article:
http://codahale.com/what-makes-jersey-interesting-parameter-classes/ about
how to create my own datatype.

However, what if I want to use this type in JSON object?

For instance, I would like the following object:

@XmlRootElement
public class GiftOrder extends Base {
String instructions;
DateParam deliveryDate;
}

And I would like that the user will only send string as deliveryDate.

I defined a constructor that accepts String like this:

public DateParam(String param) {
int i=5;
System.out.println(i);
}

but it doesn't reach it.. what needs to be my object in order to make it
working?

--
View this message in context: http://jersey.576304.n2.nabble.com/custom-parameter-in-Json-object-tp7126063p7126063.html
Sent from the Jersey mailing list archive at Nabble.com.

Loading...