Model/Protocol.php
public function jsonSerialize()
    {
        $json = [];

        if (null !== $this->id) {
            $json['id'] = $this->id;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->definition) {
            $json['definition'] = $this->definition;
        }

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

        if (null !== $this->id) {
            $json['id'] = $this->id;
        }
        if (null !== $this->description) {
            $json['description'] = $this->description;
        }
        if (null !== $this->name) {
            $json['name'] = $this->name;
        }
        if (null !== $this->definition) {
            $json['definition'] = $this->definition;
        }

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

@return array an associative array of the available variables