public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->id) {
            $json['id'] = $this->id;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->dirty) {
            $json['dirty'] = $this->dirty;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->created) {
            $json['created'] = $this->created->format(\DateTime::ISO8601);
        }
        if (null !== $this->createdBy) {
            $json['createdBy'] = $this->createdBy;
        }
        if (null !== $this->updated) {
            $json['updated'] = $this->updated->format(\DateTime::ISO8601);
        }
        if (null !== $this->updatedBy) {
            $json['updatedBy'] = $this->updatedBy;
        }
        if (null !== $this->functionalities && !empty($this->functionalities)) {
            $json['functionalities'] = $this->functionalities;
        }
        if (null !== $this->roles && !empty($this->roles)) {
            $json['roles'] = $this->roles;
        }
        if (null !== $this->extraData && !empty($this->extraData)) {
            $json['extraData'] = $this->extraData;
        }

        return $json;
    }
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->id) {
            $json['id'] = $this->id;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->dirty) {
            $json['dirty'] = $this->dirty;
        }
        if (null !== $this->deleted) {
            $json['deleted'] = $this->deleted;
        }
        if (null !== $this->created) {
            $json['created'] = $this->created->format(\DateTime::ISO8601);
        }
        if (null !== $this->createdBy) {
            $json['createdBy'] = $this->createdBy;
        }
        if (null !== $this->updated) {
            $json['updated'] = $this->updated->format(\DateTime::ISO8601);
        }
        if (null !== $this->updatedBy) {
            $json['updatedBy'] = $this->updatedBy;
        }
        if (null !== $this->functionalities && !empty($this->functionalities)) {
            $json['functionalities'] = $this->functionalities;
        }
        if (null !== $this->roles && !empty($this->roles)) {
            $json['roles'] = $this->roles;
        }
        if (null !== $this->extraData && !empty($this->extraData)) {
            $json['extraData'] = $this->extraData;
        }

        return $json;
    }
Gets all data that should be available in a json representation.

@return array an associative array of the available variables