Cascade\Config\Loader\FileLoader\Json::isJson PHP Method

isJson() private method

Determine whether a given string is supposed to be a Json string This is a very simplified validation to avoid calling json_decode (which is much more expensive). If the json is invalid, it will throw an exception when we actually load it.
private isJson ( string $string ) : boolean
$string string String to evaluate
return boolean Whether or not the passed string is meant to be a JSON string
    private function isJson($string)
    {
        return !empty($string) && ($string[0] === '[' || $string[0] === '{');
    }