Skip to content

Conversation

@vatsake
Copy link
Contributor

@vatsake vatsake commented Mar 21, 2025

Made range json serializable. Not sure if the format is ok, but atleast it won't be empty now.

For example model:
image
will become:
image
After change:
image

$Model->toJson();
//or 
json_encode($Model);

@belamov belamov self-requested a review March 21, 2025 17:43
Copy link
Owner

@belamov belamov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hello, thanks for your contribution, this is useful)
can you please add some tests for json seralization as well?

@vatsake
Copy link
Contributor Author

vatsake commented Mar 24, 2025

Added tests.
But is the format okay?

If json serializing Carbon for example:
json_encode(Carbon::now()) // ""2025-03-24T07:29:33.174073Z""
The date will be in ISO format.

@vatsake vatsake requested a review from belamov March 25, 2025 09:28
@belamov belamov merged commit a6b1d33 into belamov:master Mar 30, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants