public final static function encode(array $source): string {
		if (($source = json_encode($source)) == false && json_last_error() !== JSON_ERROR_NONE){
			throw new \Exception('Invalid raw data!');
		}

		return $source;
	}
public final static function encode(array $source): string {
		if (($source = json_encode($source)) == false && json_last_error() !== JSON_ERROR_NONE){
			throw new \Exception('Invalid raw data!');
		}

		return $source;
	}
public final static function encode ( array $ source ) : string { if ( ( $ source = json_encode ( $ source ) ) == false && json_last_error ( ) !== JSON_ERROR_NONE ) { throw new \ Exception ( 'Invalid raw data!' ) ; } return $ source ; }
Encodes an associative array into its JSON string representation.

@attention This method throws an exception
if given value cannot be represented as a JSON string.

@param array $source
@return string
@throws \Exception
Encodes an associative array into its JSON string representation .