public function format(&$data) {
		$data = $this->normalize($data);
		$data = $this->convertToString($data);

		return $data;
	}
public function format(&$data) {
		$data = $this->normalize($data);
		$data = $this->convertToString($data);

		return $data;
	}
public function format ( & $ data ) { $ data = $ this -> normalize ( $ data ) ; $ data = $ this -> convertToString ( $ data ) ; return $ data ; }
Normalises the variable, JSON encodes it if needed and cleans up the result

@param mixed $data

@return string|null
Normalises the variable JSON encodes it if needed and cleans up the result