Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Implemented JsonSerializable #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zakini
Copy link

@zakini zakini commented May 13, 2020

This allows Decimal objects to be JSON serialized using json_encode(). They are serialized as their internal string representation since this is the most accurate.

Using json_encode($decimal, JSON_NUMERIC_CHECK) results in the decimal value being serialized as a JSON number, which might be desirable for some users. This might be worth documenting, though I'm not sure where would be best to put that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant