Discussion about JSON Date formats

cancel
Showing results for 
Search instead for 
Did you mean: 

Discussion about JSON Date formats

resplin
Intermediate
0 0 1,151

Obsolete Pages{{Obsolete}}

The official documentation is at: http://docs.alfresco.com



The following document is a discussion of the REST Design guideline for JSON date formats for Alfresco


JSON Representation of Dates


How do we represent date / time in JSON?

Mikeh: I'd recommend we standardize on ISO8601,


  • 2008-11-06T13:22:17+00:00
  • 2008-11-07T09:50Z

Mrogers 11:31, 7 November 2008 (UTC): I agree, but it's a shame none of our existing APIs use it!

Jan 15:33, 10 November 2008 (UTC): fyi, the activity service uses ISO8601

Mrogers 10:53, 11 November 2008 (UTC) I can't see it, but the activities feed is implemented in Java rather than Java Script.    Roy will investigate the date issue and come up with a reccomendation.

Mikeh 12:13, 11 November 2008 (UTC) We have to- and from-ISO8601 JavaScript helpers borrowed from Dojo for Activites and Calendar within Share. Have a look in activity-list.get.js and alfresco.js for examples.

Mrogers 13:10, 11 November 2008 (UTC) Thanks Mike this works. I have now made use of to-ISO8601. Roy can you confirm you are happy with using the to/from-ISO8601 rather than a bespoke solution.   Then we will need to plan to use it across the API.



{
  data:[
      {
         'sandboxref' : 'buffy',
         'name' : 'buffy',
         'createdBy' : 'admin',
         'createdOn' : { 'iso8601' : '2008-11-12T13:51:41.156Z' },
         'url' : '\/alfresco\/service\/api\/wcm\/webprojects\/buffy\/sandboxes\/buffy'
      }
    ,
      {
         'sandboxref' : 'buffy--admin',
         'name' : 'admin',
         'createdBy' : 'admin',
         'createdOn' : { 'iso8601' : '2008-11-12T13:51:42.125Z' },
         'url' : '\/alfresco\/service\/api\/wcm\/webprojects\/buffy\/sandboxes\/buffy--admin'
      }
   
  ]
}


Mrogers 18:35, 13 November 2008 (UTC) Offline email discussion.   We now have a standard.
Engineering Notes