public function jsonSerialize()
{
$properties = new \stdClass();
foreach ($this->properties as $property) {
$name = $property->getName();
$value = $property->getValue();
if (empty($name) || empty($value)) {
continue;
}
$properties->{$name} = $value;
}
return json_encode($properties);
}
/** * @return string */ public function jsonSerialize() { return $this->propertyList->jsonSerialize(); }