cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: char and Character converted to ascii numbers when serializing to application/json objects
Date Mon, 03 Aug 2009 19:31:15 GMT
On Sat August 1 2009 4:24:31 pm kanch wrote:
> CXF 2.2.2. I've been using the cxf-bundle-jaxrs package, and default
> databinding.

That would probably be JAXB then.   JAXB doesn't really provide a mapping for 
char so it really doesn't surprise me.   

You can probably register an @XmlJavaTypeAdapter thing via an annotation on 
the property that would handle the to/from string conversions.   That may 
work.

Dan


>
> bimargulies wrote:
> > What version of CXF? What databinding?
> >
> > On Sat, Aug 1, 2009 at 12:38 PM, kanch <podderka@gmail.com> wrote:
> >> Hi all,
> >>
> >> I have an object that contains a Character property. When I call my REST
> >> service to retrieve an object of this type in json format
> >> (@Produce("application/json")) it converts the Character to it's ascii
> >> representation. How can I stop this and retrieve the actual character?
> >>
> >> Thanks in advance.
> >> --
> >> View this message in context:
> >> http://www.nabble.com/char-and-Character-converted-to-ascii-numbers-when
> >>-serializing-to-application-json-objects-tp24770617p24770617.html Sent
> >> from the cxf-user mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message