Use json_number_value(); it's less error prone