Fixed bug #50224 where float without decimals were converted to integer when encode to JSON

Refs #635
Oh, right, so then you would need to write `(char *)num`, gotcha :)