the-kbA-team / json-rpc

Simple JSON-RPC PHP client/server that just works.
https://packagist.org/packages/kba-team/json-rpc
MIT License
0 stars 0 forks source link

procedure arguments might need transformation #11

Closed gregor-j closed 1 month ago

gregor-j commented 1 month ago

In case a procedure argument is a JsonSerializeable object, encoded object gets decoded as associative array and not as an object. A common API that clients and servers share, might define objects as function parameters and return values.

This problem can be solved by a wrapper for Client::execute() on the client side. However on the server side, this problem has to be solved inside ProcedureHandler::executeMethod() before invokeArgs().

I suggest a $argsTransformMethod in the same way as $beforeMethodName.