Currently JSON RPC Server passes parameters to the method in the order they were passed to the server. As the JSON-RPC protocol doesn't require correct param order when using non-numeric keys in the parameter struct the order of the arguments will not necessary match the method callback's signature. This patch introduces a simple solution by ordering the method callback arguments by key first. A better solution would be to introduce a #default key in the method parameter definition returned by hook_service and using it to pad optional arguments when method callback. For a full discussion, please see: http://drupal.org/node/715044

CommentFileSizeAuthor
jsonrpc_server-param-order.patch1.02 KBsolipsist

Comments

Hugo Wetterberg’s picture

Status: Needs review » Fixed

Committed to the dev repo and will be rolled into the next release

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.