Ajax解析器错误

My following javascript code doesn't working and return the following message : parsererror
resources.php should return the following :{"cpu":"1.12"}
resources.php file contains :

<?php $load = sys_getloadavg(); echo '{"cpu":"'.json_encode($load[0]).'"}'; ?>

Javascript code :

        $.ajax({
        url : 'resources.php', //Target URL for JSON file
        contentType: 'application/json; charset=utf-8',
        type: 'GET',
        dataType: 'json',
        async : false,
        success : function(data){
            console.log(data);
        },
        error : function(xhr, status){
            console.log(status);
            alert(status);
        }
    });

I think you missed the header in php. can check it properly

<?php
    header('Content-type: application/json; charset=utf-8');
    $load = sys_getloadavg();
    $data = array('cpu' => $load);
    echo json_encode($data);
?>

jquery:

$.ajax({
    url : 'resources.php',
    dataType: 'json',
    success : function(data){
        console.log(data);
    },
    error : function(xhr, status){
        console.log(status);
    }
});