Format json::Number as an integer if there is no fractional part and set double values to use maximum precision