You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Mistroni <mm...@gmail.com> on 2012/11/29 23:12:14 UTC

issue with jsonFormatting and timestamps

Hello all
   i have a serverside camelapp in which i am exposing an http channel
which returns json data.
the problem i have is that one of the object i serialize contains a
timestamp, and this is how the object is beign serialized

[{"title":"[video] Tablet Boom: A Derivative
Play?","description":"","newsItemId":{"ticker":"MCD","publishedDate":1353969000000}}

i had a look at JsonDataFormat but i cannot plug any serializer in there

as i am using Jackson, are there any system properties i can set to
serlialize the timestamp perhaps into a readable string?

thanks in advance and sorry for bothering

regards
 marco

Re: issue with jsonFormatting and timestamps

Posted by Claus Ibsen <cl...@gmail.com>.
I logged a new ticket just in case we didnt have that ticket I think we have
https://issues.apache.org/jira/browse/CAMEL-5836

On Fri, Nov 30, 2012 at 12:25 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> Yeah I think we may have a JIRA ticket to improve the json data format
> to allow to configure it.
>
> Frankly we should maybe let json default be jackson. And add ways to
> configure it, so you can set custom serializers etc.
>
>
>
> On Thu, Nov 29, 2012 at 11:12 PM, Marco Mistroni <mm...@gmail.com> wrote:
>> Hello all
>>    i have a serverside camelapp in which i am exposing an http channel
>> which returns json data.
>> the problem i have is that one of the object i serialize contains a
>> timestamp, and this is how the object is beign serialized
>>
>> [{"title":"[video] Tablet Boom: A Derivative
>> Play?","description":"","newsItemId":{"ticker":"MCD","publishedDate":1353969000000}}
>>
>> i had a look at JsonDataFormat but i cannot plug any serializer in there
>>
>> as i am using Jackson, are there any system properties i can set to
>> serlialize the timestamp perhaps into a readable string?
>>
>> thanks in advance and sorry for bothering
>>
>> regards
>>  marco
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cibsen@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: issue with jsonFormatting and timestamps

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah I think we may have a JIRA ticket to improve the json data format
to allow to configure it.

Frankly we should maybe let json default be jackson. And add ways to
configure it, so you can set custom serializers etc.



On Thu, Nov 29, 2012 at 11:12 PM, Marco Mistroni <mm...@gmail.com> wrote:
> Hello all
>    i have a serverside camelapp in which i am exposing an http channel
> which returns json data.
> the problem i have is that one of the object i serialize contains a
> timestamp, and this is how the object is beign serialized
>
> [{"title":"[video] Tablet Boom: A Derivative
> Play?","description":"","newsItemId":{"ticker":"MCD","publishedDate":1353969000000}}
>
> i had a look at JsonDataFormat but i cannot plug any serializer in there
>
> as i am using Jackson, are there any system properties i can set to
> serlialize the timestamp perhaps into a readable string?
>
> thanks in advance and sorry for bothering
>
> regards
>  marco



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen