Simplex-Calculator icon indicating copy to clipboard operation
Simplex-Calculator copied to clipboard

[Proposal] Implement JsonSerializable Interface

Open Domi04151309 opened this issue 2 years ago • 2 comments

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

Domi04151309 avatar Jul 15 '23 11:07 Domi04151309

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

uestla avatar Jul 17 '23 15:07 uestla

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.

Domi04151309 avatar Jul 24 '23 14:07 Domi04151309