function jsonSerialize() { $retval = array("Name" => $this->name, "Content" => $this->data, "ContentType" => $this->mimeType ?: "application/octet-stream", "ContentId" => $this->name); return $retval; }