-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
If JSON_PRESERVE_ZERO_FRACTION isn't defined, then this library converts any whole-number float value to an integer. This can cause some hard-to-find bugs and it would be better if this script complained more loudly.
I think this package should have a check for if(!defined('JSON_PRESERVE_ZERO_FRACTION')) and throw an E_USER_WARNING or exception. It could either do this all the time, or it could do it only if float / whole-number-float values are included in a data payload.
Generally speaking I would advise against using this package if JSON_PRESERVE_ZERO_FRACTION wasn't available. Probably, I would recommend that the user of the package upgrades.
What do you think?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels