The answer is don't use floats. In most languages floats only have about 6 digits of significance and not too many more for doubles (note python floats are doubles). Use decimals if you know the exact precision. For JSON send it as a string or an int with an implied decimal point.
soap box: floats are very much overused. Floats should not be used by anything that you wouldn't represent with scientific notation, as that is what they really are underneath.
Note: Databases do not usually use floating point numbers, they use fixed point numbers. Which is exactly what a decimal is.
clarification
before you write the json file do something like
with open("c:\\myfile","w") as my_file:
for key in d:
if isinstance(d[key], Decimal):
d[key] = str(d[key])
my_file.write(json.dumps(d))
then when reading the json, you can just put the value into the database as is or convert it back to Decimal if you need to work with it more.