You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize there is a PR #52 which will allow ourselves to implement JsonSerializable interface.
Let me know if you want to have a built-in jsonSerialize() or just let the library user to implement this ourselves. If this ever gets implemented, need to let library users to know that it is a breaking change.
Using laravel, it can automatically serialize array or object into json. For example
becomes
However, if laravel is returning brick/money, it returns an empty object:
becomes
How do you make it to serialize into
{"amount":0.1,"currency":"AUD"}
response instead?Other way I can think of is to implement
JsonSerializable
and implementjsonSerialize()
function:As for test:
Also it needed
ext-json
in composerThe text was updated successfully, but these errors were encountered: