users@jersey.java.net

message body writers

From: Suchitha Koneru (sukoneru) <"Suchitha>
Date: Tue, 11 Aug 2009 19:41:06 -0700

Hello Jersey Users,

                 When developing custom message body writers for basic
java data types (Boolean, Int , Long etc) do we need to develop two
instances of the message body writer , one which supports basic java
data type and the other which supports the collection(List,Vector for
that basic data type)

 

For example List<Integer> and Integer can they have the same message
body writer ?

 

Can we use the same Message Body Writer for supporting all subclasses
of Java.Lang.Number ?

 

Could you please provide some pointers in this regard

 

Thank you,

suchitha