public function jsonSerialize()
{
$vars = array_filter(get_object_vars($this));
// clear undefined json property
unset($vars['customFields']);
// repackaging custom field
if (!empty($this->customFields)) {
foreach ($this->customFields as $key => $value) {
$vars[$key] = $value;
}
}
return $vars;
}