-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
neither ignore_nan=True nor allow_nan=False handle Decimals correctly #149
Comments
If this issue is important to you, the best way to expedite it is to submit a PR with tests |
The text here is definitely a great start for writing some tests, btw |
Do you think that'd mean digging in to the C code? If not, I'll try to circle back to it when I'm not under the gun. A second inconsistency (change the issue title to reflect it): simplejson.dumps(decimal.Decimal('NaN'), allow_nan=False) # NaN
simplejson.dumps(np.NaN, allow_nan=False) # exception |
I don't recall much C code that deals with decimal, but without writing the tests and Python implementation or auditing the C implementation I couldn't say for sure whether or not any digging there is required. A PR with failing tests (or half-failing when C extensions are enabled) is going to speed up the process if this is something you need. |
This isn't in our workflow anymore, so while I think it'd be good to fix, it's off my radar for now. |
To be honest when this feature originally went in, I had no idea the Decimal even had a representation for special values since I had never seen one in the wild, so I didn't think to look into it. Maybe the easiest thing to do would be to add something like |
The text was updated successfully, but these errors were encountered: