properly formatting int and float values from python to json.