PHP seems to have a bug in the way it handles decimal precision in json_encode.
It's easy to see just by encoding a simple float:
echo json_encode(["testVal" => 54932.00]);
// Prints out:
{"testVal": 54932}
How I can get result like this:
{"testVal": 54932.00}
I need two decimals places (including .00
) in json.