Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Deserialize JSON Unix Timestamp from REST API

Aidan Campbell May 31, 2015

I'm using this api: /rest/greenhopper/1.0/rapid/charts/scopechangeburndownchart?rapidViewId=1&sprintId=1
Which returns: 

"changes": {
"1432735594000": [{
    "key": "OV-1",
    "column": {
        "notDone": true,
        "newStatus": "10000"
    }
}],
"1432735600478": [{
    "key": "OV-1",
    "added": true
}],

I have been searching for a two days but I am unsure how to convert the unix time stamp "1432735600478"  or "1432735594000" and others to a C# DateTime using Newtonsoft.

I am trying to record all of the changes to the sprint but because the timestamp is different every time, I can't figure out how to create the property in C# to store the value whereas "key" property would be constant in every JSON response.

An answer to this would be great. I don't expect the exact answer but I hope someone could point me in the right direction.

Thanks for any help,

Aidan

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2015

Hello Aidan,

Thank you for your question.

Please, refer to the following http://stackoverflow.com/questions/19971494/how-to-deserialize-a-unix-timestamp-ms-to-a-datetime.

Kind regards,
Rafael P. Sperafico
Atlassian Support

 

TAGS
AUG Leaders

Atlassian Community Events