public static function fromJson($json) { // Currently, we only support json object if (is_object($json)) { $owner = new Owner(); if (isset($json->id)) { $owner->setId($json->id); } if (isset($json->displayName)) { $owner->setDispalyName($json->displayName); } return $owner; } return NULL; }