public static function isJson($input): bool
    {
        $test = json_decode($input);
        return ($test instanceof \stdClass || \is_array($test));
    }
public static function isJson($input): bool
    {
        $test = json_decode($input);
        return ($test instanceof \stdClass || \is_array($test));
    }
public static function isJson ( $ input ) : bool { $ test = json_decode ( $ input ) ; return ( $ test instanceof \ stdClass || \ is_array ( $ test ) ) ; }
Check if input value is valid JSON

@param   mixed $input
@return  bool
Check if input value is valid JSON