public function decodeJson($assoc = false)
    {
        $result = json_decode($this->body, $assoc);

        if (json_last_error() !== JSON_ERROR_NONE) {
            throw new PipelinerHttpException($this, "Error while parsing returned JSON");
        }

        return $result;
    }