Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ashish12169
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company
Accepted Solution

Blackberry how to parse date in Json String..

i get the time from the server in Json String.is there any Json deserializer for it so i get the time.
if no pls suggest how i can parse it.

"StartTime":"\/Date(1349818680000+0530)\/"

Please use plain text.
Developer
simon_hain
Posts: 15,806
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Blackberry how to parse date in Json String..

see
http://supportforums.blackberry.com/t5/Java-Development/Sample-Code-Implementing-JSON-in-your-applic...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
ashish12169
Posts: 214
Registered: ‎03-18-2012
My Device: 8520
My Carrier: Company

Re: Blackberry how to parse date in Json String..

Hi thanks,

                but problem how to get  get the time from the String.

               is there any Json Deserilizer that provide the time fom the  String= "\/Date(1349818680000+0530)\/"

              pls Suggest....

Please use plain text.
Developer
pradeep_ch
Posts: 543
Registered: ‎12-23-2010
My Device: Bold
My Carrier: Airtel

Re: Blackberry how to parse date in Json String..

I think you are getting milli seconds + time zone difference,

 

You can construct date object using those values.

 

Thanks.

Please use plain text.
Developer
simon_hain
Posts: 15,806
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Blackberry how to parse date in Json String..

you have to parse the time manually.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.