Skip to content

Conversation

@azizk
Copy link

@azizk azizk commented Aug 12, 2024

It's unnecessary to decode them as Decimals with decimal: true, since integers can already be of arbitrary size, limited only by memory.

It can create issues in controllers when the Plug.Parsers plug is configured to use Poison with the :decimal option:

plug Plug.Parsers,
  parsers: [:urlencoded, :multipart, :json],
  pass: ["*/*"],
  json_decoder: {Poison, :decode!, [[decimal: true]]}

It's unnecessary to decode them as `Decimal`s with `decimal: true`,
since integers can already be of arbitrary size, limited only by memory.

It can create issues in controllers when the `Plug.Parsers` plug
is configured to use Poison with the `:decimal` option:

```elixir
plug Plug.Parsers,
  parsers: [:urlencoded, :multipart, :json],
  pass: ["*/*"],
  json_decoder: {Poison, :decode!, [[decimal: true]]}
```
@azizk
Copy link
Author

azizk commented Oct 22, 2024

Hi, Devin! I hope you're doing well! Is there a chance to get this merged or at least reviewed? I think it's important and it shouldn't sit around any longer. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant