You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "jagapriya.s@gmail.com" <ja...@gmail.com> on 2010/09/20 14:59:36 UTC
CXF json using Spring framework
Hi,
I am using cxf 2.1 version json response.
I notice the individual values type are automatically set as integer and
string respectively.
Can any one tel me how to set all the values as Strings.
Eg:
Current reponse:
{"results":{"@total":"1","@lasthit":"1","@firsthit":"1","result":{"url":"http:\/\/www.ocbc.com","name":"OCBC
CENTRE","floor":1,"unit":0,"blockhouseno":65}}}
Expected response:
{"results":{"@total":"1","@lasthit":"1","@firsthit":"1","result":{"url":"http:\/\/www.ocbc.com","name":"OCBC
CENTRE","floor":"01","unit":"00","blockhouseno":"65"}}}
Regards,
Priya
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-json-using-Spring-framework-tp2846558p2846558.html
Sent from the cxf-dev mailing list archive at Nabble.com.
Re: CXF json using Spring framework
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
This is really a question for the users list...
Starting from Jettison 1.1 it is possible to register TypeConverters,
SimpleConverter is the one which can help.
I'll see if I can update JSONProvider for it to register the converters if
needed
cheers, Sergey
[1] http://jettison.codehaus.org/User%27s+Guide#User%27sGuide-Typeconversion
On Tue, Sep 21, 2010 at 1:46 AM, Panpan <pp...@platform.com> wrote:
>
> I have also met this problem in my project. Can anyone help to solve this?
>
> Thanks.
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/CXF-json-using-Spring-framework-tp2846558p2847406.html
> Sent from the cxf-dev mailing list archive at Nabble.com.
>
Re: CXF json using Spring framework
Posted by Panpan <pp...@platform.com>.
I have also met this problem in my project. Can anyone help to solve this?
Thanks.
--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-json-using-Spring-framework-tp2846558p2847406.html
Sent from the cxf-dev mailing list archive at Nabble.com.