added funcs to write a float in a json