code: public function toJSON($pretty = false)
  	{
  		if ($pretty) {
  			return json_encode($this->scope->results, JSON_PRETTY_PRINT);
  		}
  		return json_encode($this->scope->results);
  	}
docs: Returns results as JSON string.
  
  @param bool $pretty
  @return string