Model/Protocol.php
public function setDefinition($definition)
    {
        if (is_array($definition)) {
            $this->definition = $definition;

            return $this;
        }
        $this->definition = json_decode($definition, true);
        if (null === $this->definition) {
            $this->definition = $definition;
        }

        return $this;
    }
public function setDefinition($definition)
    {
        if (is_array($definition)) {
            $this->definition = $definition;

            return $this;
        }
        $this->definition = json_decode($definition, true);
        if (null === $this->definition) {
            $this->definition = $definition;
        }

        return $this;
    }
Sets the "definition" of the Protocol.

@param array|string $definition

@return Protocol