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
I try to use the latest version of jsonfreeze, but I have no luck with a simple object graph:
abstract class AbstractSessionData implements SessionData {
private $version;
private $customerId;
private $sessionId;
private $user;
private $status;
// some implementations of getters and setters defined by interface SessionData
}
class HeartbeatSession extends AbstractSessionData {
private $timeLeft;
private $logoutUri;
private $userId;
//...
}
I use your library to serialize an object of class HeartbeatSession:
public static function writeSessionData(string $key, SessionData $dao): bool {
$serializer = new JsonSerializer();
var_dump($dao);
$str = $serializer->serialize($dao);
var_dump($str);
return (file_put_contents($key, $serializer->serialize($dao)) !== false);
}
The first var_dump writes the whole object graph inclusive the values from AbstractSessionData, but the var_dump of the serializer results only shows the values from the subclass HeartbeatSession. Is this an error?
The text was updated successfully, but these errors were encountered:
I try to use the latest version of jsonfreeze, but I have no luck with a simple object graph:
I use your library to serialize an object of class
HeartbeatSession
:The first
var_dump
writes the whole object graph inclusive the values fromAbstractSessionData
, but thevar_dump
of the serializer results only shows the values from the subclassHeartbeatSession
. Is this an error?The text was updated successfully, but these errors were encountered: