-
Notifications
You must be signed in to change notification settings - Fork 18
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
Throw when JSON.stringify works with decimals #167
Conversation
Remove special logic in the `SerializeJSONProperty` AO.
Seems okay, though if we do this then the urgency of |
Of course, |
I would be slightly in favor, I think, of Decimal supporting toJSON, but if it does, it should retain the whole data model (trailing zeros) in order for it to round-trip. |
As a first step in the integration between JSON and decimals, let's make decimal align with BigInts by throwing a
TypeError
.This decision isn't necessarily final. The change is made so that, at least, we have some kind of defined behavior. We may end up returning a value instead of throwing.
CC @sffc