public function toJson()
{
$data = ['username' => $this->getUsername(), 'avatar' => $this->getAvatar(), 'email' => $this->getEmail(), 'first_name' => $this->getFirstName(), 'last_name' => $this->getLastName(), 'full_name' => $this->getFullName(), 'header' => $this->getHeader(), 'title' => $this->getTitle(), 'institution' => $this->getInstitution(), 'city' => $this->getCity()];
if ($this->getCountry() instanceof Country) {
$data['country'] = $this->getCountry()->getName();
}
return json_encode($data);
}