Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Proposal] Implement JsonSerializable Interface #20

Open
Domi04151309 opened this issue Jul 15, 2023 · 2 comments
Open

[Proposal] Implement JsonSerializable Interface #20

Domi04151309 opened this issue Jul 15, 2023 · 2 comments

Comments

@Domi04151309
Copy link
Contributor

It would be nice if the result could be converted to JSON by having the classes implement JsonSerializable.

@uestla
Copy link
Owner

uestla commented Jul 17, 2023

The result can be simply just by json_encode($solver->getSolution())

@Domi04151309
Copy link
Contributor Author

Yes, that's right. What I meant was being able to call json_encode($solver) to get a JSON-Object containing all public variables (accessible through the getters) in a similar format to print_r.

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

No branches or pull requests

2 participants