Closed wind-shift closed 3 months ago
Python uses floats for it's JSON library. Herein lies the problems.
$ python
import json json.dumps(10.001) '10.000999999999999' json.loads('{"blaa": 0.333331}') {u'blaa': 0.33333099999999999} type(json.loads('{"blaa": 0.333331}')['blaa']) <type 'float'>
This is unacceptable.
see https://bitcointalk.org/index.php?topic=4086.msg58882#msg58882
In fact, it’s impossible to customize the behaviour of orjson to map to decimal values. This is weird.
Python uses floats for it's JSON library. Herein lies the problems.
$ python
This is unacceptable.
see https://bitcointalk.org/index.php?topic=4086.msg58882#msg58882
In fact, it’s impossible to customize the behaviour of orjson to map to decimal values. This is weird.