protected function hasValidJson($jsonError)
    {
        if ($jsonError === JSON_ERROR_NONE) {
            return true;
        }

        return $this->hasEncodingOption(JSON_PARTIAL_OUTPUT_ON_ERROR) &&
                    in_array($jsonError, [
                        JSON_ERROR_RECURSION,
                        JSON_ERROR_INF_OR_NAN,
                        JSON_ERROR_UNSUPPORTED_TYPE,
                    ]);
    }
protected function hasValidJson($jsonError)
    {
        if ($jsonError === JSON_ERROR_NONE) {
            return true;
        }

        return $this->hasEncodingOption(JSON_PARTIAL_OUTPUT_ON_ERROR) &&
                    in_array($jsonError, [
                        JSON_ERROR_RECURSION,
                        JSON_ERROR_INF_OR_NAN,
                        JSON_ERROR_UNSUPPORTED_TYPE,
                    ]);
    }
protected function hasValidJson ( $ jsonError ) { if ( $ jsonError === JSON_ERROR_NONE ) { return true ; } return $ this -> hasEncodingOption ( JSON_PARTIAL_OUTPUT_ON_ERROR ) && in_array ( $ jsonError , [ JSON_ERROR_RECURSION , JSON_ERROR_INF_OR_NAN , JSON_ERROR_UNSUPPORTED_TYPE , ] ) ; }
Determine if an error occurred during JSON encoding.

@param  int  $jsonError
@return bool
Determine if an error occurred during JSON encoding .