I'm running into a bit of a problem that I think is due to Transfer
(whether this is configurable or not, I'm not sure).
I'm getting a data object (say, "user") as part of an Ajax request
which I want to serialize into JSON. So, I'm outputting
#serializeJson(user)# as my JSON, which JS can evaluate just fine.
However, any date fields returned look like they're strings in
"YYYY-MM-DD HH:MM:SS.ms" format, rather than actual date time objects
(i.e., "{ts '2010-01-13 19:09:09'}"). So, when CF serializes it into
JSON, it doesn't return the date fields in a format that javascript
recognizes as a date. I could try doing this manually as a query, but
my object has several relationships that I also want serialized, so it
could be a bit tedious to build the JSON myself.
Now, if after getting the object, I set that date to a CF date object
(such as now() or I parseDateTime the original field), it works as it
should -- which is why I think it's something Transfer may be doing.
Has anyone encountered this?
This is CF9 running on Apache (Mac OS) hitting a mySQL database.
Scott
--
-----------------------------------------
Scott Brady
http://www.scottbrady.net/
--
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en