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
This would both make it more convenient to decode formats where there's no distinction between ints and floats, and act as documentation about the context outlined above.
If this sounds like a good idea, I'd be happy to create a PR for it.
The text was updated successfully, but these errors were encountered:
Context
Given that
decode
API is used with formats like JSON, where there is no distinction between floats and ints, andit can be confusing that on the Erlang target
decode.float
will not accept e.g.1
, but requires1.0
to work properly.Suggestion
Add
decode.number: Decoder(Float)
, which would work equivalently toThis would both make it more convenient to decode formats where there's no distinction between ints and floats, and act as documentation about the context outlined above.
If this sounds like a good idea, I'd be happy to create a PR for it.
The text was updated successfully, but these errors were encountered: