private function jsonToArray($json)
	{
		try {
			$data = json_decode($json, true);
			if(is_array($data)) {
				return $data;
			}
			else {
				$this->error = 'The given data string was not json';
				return [];
			}
		}
		catch(Exception $e) {
			$this->error = $e;
		}
	}
private function jsonToArray($json)
	{
		try {
			$data = json_decode($json, true);
			if(is_array($data)) {
				return $data;
			}
			else {
				$this->error = 'The given data string was not json';
				return [];
			}
		}
		catch(Exception $e) {
			$this->error = $e;
		}
	}
private function jsonToArray ( $ json ) { try { $ data = json_decode ( $ json , true ) ; if ( is_array ( $ data ) ) { return $ data ; } else { $ this -> error = 'The given data string was not json' ; return [ ] ; } } catch ( Exception $ e ) { $ this -> error = $ e ; } }
Convert json string to an array if the syntax is right

@param string (json)
@return array|null
Convert json string to an array if the syntax is right