Json调用JSON.parse:意外结束数据

I've been looking around stackoverflow for the answer to my problem but I can't seem to find why this is happening.

I've created a webserver which returns a JSON object:

http://213.125.101.19/api.php?function=test

After that i created an HTML file with the following javascript to call the JSON using Ajax

<script language="javascript" type="text/javascript">
    <!-- 
    //Browser Support Code
    function ajaxCall(){
        var ajaxRequest;  // The variable that makes Ajax possible!

        try{
            // Opera 8.0+, Firefox, Safari
            ajaxRequest = new XMLHttpRequest();
        } catch (e){
            // Internet Explorer Browsers
            try{
                ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try{
                    ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e){
                    // Something went wrong
                    alert("Your browser broke!");
                    return false;
                }
            }
        }

        // Create a function that will receive data sent from the server
        ajaxRequest.onreadystatechange = function(){
            if(ajaxRequest.readyState == 4){
                var response = ajaxRequest.responseText;
                obj = JSON.parse(response);
                console.log(obj);

                if(response.indexOf("Fatal error")>=0){
                    alert('Error, Try again.');
                }else{
                    document.getElementById("response").value = response;               
                }                 

            }   
        }


            ajaxRequest.open("GET", "http://213.125.101.19/api.php?function=test", true);
            ajaxRequest.send(null); 
    }
    </script>

When I run this code, my Firebug returns

"SyntaxError: JSON.parse: unexpected end of data obj = JSON.parse(response);"

If I run my JSON trough a validator, everything seems to be fine.

Any ideas how to fix this?

Kind Regards, Luuk

JSON looks simple enough. I guess there's something wrong with the call or the return value.

Check status and responseType as well

ajaxRequest.onreadystatechange = function(){
    if(ajaxRequest.readyState == 4){
        console.log('status=' + ajaxRequest.status +
                    ', statusText=' + ajaxRequest.statusText +
                    ', responseType=' + ajaxRequest.responseType +
                    ', responseText=' + ajaxRequest.responseText);
...
}

The problem for this issue was that my HTML request was being send to my webserver from another pc.

@Olaf Dietsche said it was a good idea to check the ajaxrequest status. This gave a 0 which is not a successfull response.

After copying the html request file to the webserver the problem was solved.

Thanks everybody for helping me out with this.