You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one needs to change the representation of floats then they have to extend the encoder and override iterencode by copying over most of the code and just:
replacing the _repr=FLOAT_REPR to something that they need.
removing the C encoder option
The text was updated successfully, but these errors were encountered:
Because I need to reproduce behaviour someone has borrowed from pandasto_json which they called with set double precision on float serialization. The code is used for hash calculation so pretty critical to repeat that silly behaviour.
That's a very unfortunate scenario, hashing a json encoded string is just asking for trouble. floats are printed at full double precision of course, but an optimal algorithm is used (the fewest digits that will round-trip through a correct parser exactly). The C extension can be disabled (globally), although this is more of a private implementation detail used by the test suite.
If one needs to change the representation of floats then they have to extend the encoder and override
iterencode
by copying over most of the code and just:_repr=FLOAT_REPR
to something that they need.The text was updated successfully, but these errors were encountered: