-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Related to #1907, per strongloop-community/loopback-sdk-ios#83 (comment):
Data object is also encoded in two different ways:
- Method/callback arguments:
{ '$type': 'date', '$data': 'Thu Jan 01 1970 09:00:00 GMT+0900 (JST)' }- Model properties:
'1970-01-01T00:00:00.000Z'(a plain string)The format difference is caused because
date.toString()is used for the method/callback arg case, whereas it looksdate.toISOString()is used for properties
I am proposing to unify this behaviour and always use the plain ISO date string encoding, which is used by JSON.stringify too.
In order to support older clients and make the upgrade path smoother, we should keep support of {$type,$data} format in input arguments.
Subtasks:
- fix strong-remoting
- fix iOS SDK
@raymondfeng @ritch @STRML @fabien thoughts?
/cc @hideya