src/Entities/Connections/Connection.php
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'fromOrganisation' => $this->getFromOrganisation(),
            'toOrganisation' => $this->getToOrganisation(),
            'type' => $this->getType(),
            'ended' => $this->getEnded(),
            'enabled' => $this->isEnabled(),
            'status' => $this->getStatus(),
            'settlementInterval' => $this->getSettlementInterval(),
        ];
    }
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'fromOrganisation' => $this->getFromOrganisation(),
            'toOrganisation' => $this->getToOrganisation(),
            'type' => $this->getType(),
            'ended' => $this->getEnded(),
            'enabled' => $this->isEnabled(),
            'status' => $this->getStatus(),
            'settlementInterval' => $this->getSettlementInterval(),
        ];
    }
Specify data which should be serialized to JSON