处理jQuery JSON中的小数

I am retrieving some info through $.get from a ajax.php script. In the ajax.php script i get different numbers form a database which i want to update live on the site.

However, now i have run into the problem that some of the values that come from the DB are decimal ones, like: 0.79

When i JSON encode them in the ajax.php script they are returned fine for ex: o_epc:"0.71" but for some reason my $.get doesent understand this value and returns it as null

Any ideas on how to get this to work?

Here is my $.get call

                $.get("ajax.php", { opt: "networkStats", o_id: b }, function(r) {
                var j = eval('(' + r + ')');

                if(j.message) {
                    console.log(j.message);                     
                }
            });

This is how i encode my json

    $epc = (float) $db['o_epc'];

$RET['message']['o_epc'] = $epc;
die(json_encode($RET));

try encoding that way:

o_epc: 0.71

as http://json.org allows:

number
    int
    int frac
frac
    . digits

If php is encoding them as "0.71", then they've been converted to a string somewhere in your script. JSON allows bare numbers, but only if they're actually integers/floats. So check your script for things like sprintf() and numberformat(), which'd internally convert the value to a string.