[jboss-jira] [JBoss JIRA] (DROOLS-1053) Change date formats for JSON representations used in the REST API

Maciej Swiderski (JIRA) issues at jboss.org
Mon Feb 8 08:46:00 EST 2016


    [ https://issues.jboss.org/browse/DROOLS-1053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159748#comment-13159748 ] 

Maciej Swiderski commented on DROOLS-1053:
------------------------------------------

this has been recently added so you can set system property to enable text based date format for JSON marshaller:
https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/json/JSONMarshaller.java#L66

though it does use certain data format pattern: https://github.com/droolsjbpm/droolsjbpm-integration/blob/master/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/json/JSONMarshaller.java#L73

would this be sufficient or shall we have another system property to control actual date format pattern?

> Change date formats for JSON representations used in the REST API
> -----------------------------------------------------------------
>
>                 Key: DROOLS-1053
>                 URL: https://issues.jboss.org/browse/DROOLS-1053
>             Project: Drools
>          Issue Type: Feature Request
>          Components: kie server
>    Affects Versions: 6.3.0.Final
>         Environment: jBPM 6.3 running on Wildfly 8.2
>            Reporter: William Siqueira
>            Assignee: Maciej Swiderski
>
> The format for dates are are using milliseconds form, for example:
> {code:javascript}
> {
>     "request-instance-id" : 4,
>     "request-status" : "QUEUED",
>     "request-message" : "Ready to execute",
>     "request-retries" : 3,
>     "request-executions" : 0,
>     "request-command" : "org.jbpm.executor.commands.PrintOutCommand",
>     "request-scheduled-date" : 1455069600000
>   }
> {code}
> The problem with this format is that it is not readable and might confuse users using other ways to communicate with the kie server than using its REST API.
> The suggested solution is use a Jackson object mapper to configure the desired date format. This is better explained in this article:
> http://wiki.fasterxml.com/JacksonFAQDateHandling  



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list