protected function parse($data = null, $filename = null)
    {
        if (json_last_error() !== JSON_ERROR_NONE) {
            $error_message  = 'Syntax error';
            if (function_exists('json_last_error_msg')) {
                $error_message = json_last_error_msg();
            }

            $error = [
                'message' => $error_message,
                'type'    => json_last_error(),
                'file'    => $filename,
            ];

            throw new ParseException($error);
        }

        return $data;
    }
protected function parse($data = null, $filename = null)
    {
        if (json_last_error() !== JSON_ERROR_NONE) {
            $error_message  = 'Syntax error';
            if (function_exists('json_last_error_msg')) {
                $error_message = json_last_error_msg();
            }

            $error = [
                'message' => $error_message,
                'type'    => json_last_error(),
                'file'    => $filename,
            ];

            throw new ParseException($error);
        }

        return $data;
    }
protected function parse ( $ data = null , $ filename = null ) { if ( json_last_error ( ) !== JSON_ERROR_NONE ) { $ error_message = 'Syntax error' ; if ( function_exists ( 'json_last_error_msg' ) ) { $ error_message = json_last_error_msg ( ) ; } $ error = [ 'message' => $ error_message , 'type' => json_last_error ( ) , 'file' => $ filename , ] ; throw new ParseException ( $ error ) ; } return $ data ; }
Completes parsing of JSON data

@param  array  $data
@param  string $filename
@return array|null

@throws ParseException If there is an error parsing the JSON data
Completes parsing of JSON data