You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DateTime::setDate() expects exactly 3 parameters, 1 given
In setProperty() in JsonMapper.php (line 381)
I see under Supported Type names that DateTime is not listed, but immediately after that in simple type mapping there is an example given using DateTime.
Do I need to enforce the DateTime on the serializing object be output as date in order for jsonmapper to correctly parse it?
The text was updated successfully, but these errors were encountered:
The DateTime example shows how a single string in JSON is converted to a DateTime object.
You are trying to map a whole JSON object with three properties onto a DateTime object. So JsonMapper creates a DateTime object, and then tries to set each of the properties separately.
This will not work.
You should add a setActiveAt method that handles the conversion of the JSON object onto DateTime itself.
I've got a class with a
DateTime
propertyWhen mapping to the class from a json object which has a serialized
DateTime
objectAn exception is thrown
In
setProperty()
inJsonMapper.php
(line 381)I see under Supported Type names that
DateTime
is not listed, but immediately after that in simple type mapping there is an example given usingDateTime
.Do I need to enforce the
DateTime
on the serializing object be output asdate
in order for jsonmapper to correctly parse it?The text was updated successfully, but these errors were encountered: