Skip to content

feat: Add support for json serializable#22

Merged
arnedesmedt merged 1 commit into
masterfrom
feature/json-serializable
Jun 22, 2026
Merged

feat: Add support for json serializable#22
arnedesmedt merged 1 commit into
masterfrom
feature/json-serializable

Conversation

@arnedesmedt

Copy link
Copy Markdown
Contributor

If I use immutable records now in json_encode, it returns an empty object '{}', since all the properties are private.

If we implement the json serializable interface, json_encode will internally call the jsonSerialize method.

See: https://www.php.net/manual/en/class.jsonserializable.php

@arnedesmedt arnedesmedt self-assigned this Jun 18, 2026
@arnedesmedt

Copy link
Copy Markdown
Contributor Author

I'll merge this one. If not ok for you, let me know, then we can undo.

@arnedesmedt arnedesmedt merged commit a3b3f30 into master Jun 22, 2026
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.

1 participant