private function isJsonMercureFormat(string $string):int
    {
        $len =  strlen($string);

        if ($len > 3 && ($string[0] == "{" && $string[$len - 1] == "}")) {
            $string = str_replace("{", "", $string);
            $string = str_replace("}", "", $string);
            $r = explode(',', $string);
            return (!in_array(" ", $r))? 1 : 0;
        }
        return (0);
    }
private function isJsonMercureFormat(string $string):int
    {
        $len =  strlen($string);

        if ($len > 3 && ($string[0] == "{" && $string[$len - 1] == "}")) {
            $string = str_replace("{", "", $string);
            $string = str_replace("}", "", $string);
            $r = explode(',', $string);
            return (!in_array(" ", $r))? 1 : 0;
        }
        return (0);
    }
private function isJsonMercureFormat ( string $ string ) : int { $ len = strlen ( $ string ) ; if ( $ len > 3 && ( $ string [ 0 ] == "{" && $ string [ $ len - 1 ] == "}" ) ) { $ string = str_replace ( "{" , "" , $ string ) ; $ string = str_replace ( "}" , "" , $ string ) ; $ r = explode ( ',' , $ string ) ; return ( ! in_array ( " " , $ r ) ) ? 1 : 0 ; } return ( 0 ) ; }
Check if string is a JSON Mercure
@param string $string string methods request
@return int If it's a json mercure or not
Check if string is a JSON Mercure