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
I'd expect the following test to succeed, but it doesn't. This is caused by the way float64 values are converted to integers in the current implementation. The tests demonstrates why json.Unmarshall probably chooses to unmarshall all numeric json values to float64 when unmarshalling to an interface.
A possible fix that could still support MustInt() etc. could be to do the conversion in the MustInt() methods. That way the expected float64 behaviour would persist, but integers could still be supported for ease of use.
The text was updated successfully, but these errors were encountered:
I'd expect the following test to succeed, but it doesn't. This is caused by the way float64 values are converted to integers in the current implementation. The tests demonstrates why
json.Unmarshall
probably chooses to unmarshall all numeric json values to float64 when unmarshalling to an interface.A possible fix that could still support
MustInt()
etc. could be to do the conversion in theMustInt()
methods. That way the expected float64 behaviour would persist, but integers could still be supported for ease of use.The text was updated successfully, but these errors were encountered: