public function toJSON() { $json = array(); $json['fields'] = array(); $json['fields']['project'] = array("id" => $this->project->getId()); $json['fields']['summary'] = $this->summary; $json['fields']['issuetype'] = array("id" => $this->issueType->getId()); $json['fields']['assignee'] = array("name" => $this->assignee->getName()); $json['fields']['reporter'] = array("name" => $this->reporter->getName()); $json['fields']['labels'] = $this->labels; $json['fields']['description'] = $this->description; return $json; }