private function isJson($string) { return !empty($string) && ($string[0] === '[' || $string[0] === '{'); }