I'm using SmartClient 8.2.
I've got a custom data source that returns a Java object from its executeFetch() method. One of the fields in this object is of type Joda DateTime (but for this question, it could really be any custom Java object). Is there a way to customize how this field is serialized to JSON in the response from the IDACall servlet? Currently DateTime gets serialized to something like:
I'd like to just have the milliseconds returned if possible, something like this:
I can create a Javascript Date object out of this on the client side and then go from there.
Thanks.
I've got a custom data source that returns a Java object from its executeFetch() method. One of the fields in this object is of type Joda DateTime (but for this question, it could really be any custom Java object). Is there a way to customize how this field is serialized to JSON in the response from the IDACall servlet? Currently DateTime gets serialized to something like:
Code:
date:{afterNow:false,beforeNow:true,centuryOfEra:20,chronology:{zone:{ID:"UTC",fixed:true}},dayOfMonth:7,dayOfWeek:6,dayOfYear:189,equalNow:false,era:1,hourOfDay:7,millis:1341644400000,millisOfDay:25200000,millisOfSecond:0,minuteOfDay:420,minuteOfHour:0,monthOfYear:7,secondOfDay:25200,secondOfMinute:0,weekOfWeekyear:27,weekyear:2012,year:2012,yearOfCentury:12,yearOfEra:2012,zone:{ID:"UTC",fixed:true}}
Code:
date:1341644400000
Thanks.
Comment