concrete/src/Error/Handler/JsonErrorHandler.php
private function clientSupportsJson($minWeight = null)
    {
        try {
            $app = Application::getFacadeApplication();
            $rmrp = $app->make(RequestMediaTypeParser::class);

            return $rmrp->isMediaTypeSupported('application/json', $minWeight);
        } catch (Exception $x) {
            return null;
        } catch (Throwable $x) {
            return null;
        }
    }
private function clientSupportsJson($minWeight = null)
    {
        try {
            $app = Application::getFacadeApplication();
            $rmrp = $app->make(RequestMediaTypeParser::class);

            return $rmrp->isMediaTypeSupported('application/json', $minWeight);
        } catch (Exception $x) {
            return null;
        } catch (Throwable $x) {
            return null;
        }
    }
private function clientSupportsJson ( $ minWeight = null ) { try { $ app = Application :: getFacadeApplication ( ) ; $ rmrp = $ app -> make ( RequestMediaTypeParser :: class ) ; return $ rmrp -> isMediaTypeSupported ( 'application/json' , $ minWeight ) ; } catch ( Exception $ x ) { return null ; } catch ( Throwable $ x ) { return null ; } }
Check if the client supports JSON.

@param float $minWeight

@return bool|null true: yes; false: no; NULL: we weren't able to detect it
Check if the client supports JSON .