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
While DRF json renderer encodes Decimal like this:
elifisinstance(obj, decimal.Decimal):
# Serializers will coerce decimals to strings by default.returnfloat(obj)
I think it is a terrible idea that they behave so differently, since it means you cannot easily switch from json to msgpack. I just tried to change, and it completely breaks my client.
The text was updated successfully, but these errors were encountered:
This project encodes Decimal like this:
While DRF json renderer encodes Decimal like this:
I think it is a terrible idea that they behave so differently, since it means you cannot easily switch from json to msgpack. I just tried to change, and it completely breaks my client.
The text was updated successfully, but these errors were encountered: