Skip to content

How to pass parse_float option to DRF json decoder #8488

Discussion options

You must be logged in to vote

Hi! The DRF builtin JSONParser.parse() always calls json.load() with two arguments - the data to be loaded and parse_constant. You can either create a custom Parser or send the decimal number as a string you can properly convert to a Decimal with a serializer.

Replies: 2 comments

This comment has been minimized.

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants