3Player::Player() =
default;
5Player::Player(
int _player_id,
User _user)
6 : player_id(_player_id), user(std::move(_user)) {
9void Player::read(
const QJsonObject &json) {
10 if (json.contains(PLAYER_ID) &&
11 json[PLAYER_ID].isDouble()) {
12 player_id = json[PLAYER_ID].toInt();
14 if (json.contains(USER) && json[USER].isObject()) {
16 user.read(json[USER].toObject());
20void Player::write(QJsonObject &json) {