Turns out JSON numbers don’t have to be interpreted as floating point numbers if you don’t want them to be.
>>> import decimal
>>> json.loads(‘1.1’, parse_float=decimal.Decimal)
However, there are some problems with floating point numbers. A really common example is that 0.1 + 0.2 = 0.30000000000000004. For science and engineering, that’s not a problem, but for a lot of other applications it’s a really big problem. It doesn’t make any sense when you are working with money for example. Slightly more than 30 cents, you say.
Anyway, there are newer ways of representing numbers like python’s decimal.Decimal which I find to be much easier to work with, which makes 0.1 + 0.2 = 0.3, just like you would expect.