Skip to content

feat: Add support for json serializable#22

Open
arnedesmedt wants to merge 1 commit into
masterfrom
feature/json-serializable
Open

feat: Add support for json serializable#22
arnedesmedt wants to merge 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
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