Posted by claudiu.cristea on September 3, 2011 at 11:34am
This is a complete Drupal 7 version for JSONRPC Server module. The module has been refactored to D7 & Services 3 APIs. Also the code has been cleaned up. The server class JsonRpcServer is clean and improved.
State of this project
This sandbox project will be removed after creating a 7.x-1.x branch in the main module.
Backport
There will be no backport for the new features or improvements for Drupal 6. However, anybody can create backport patches and post them to JSONRPC Server.
Improvements
- Drupal 7 port.
- Services 3 compatibility.
- Code cleanup & coding standards fixes.
- PHP 5.3 compatibility.
- The "GET" method is now collapsing multiple parameters with the same name in arrays.
- The "GET" method can be disallowed from the endpoint configuration form.
- Added also support for HTTP Content-Type(s):
application/json-rpc,application/jsonrequestalong withapplication/json. This is a JSON-RPC recommendation. - Removed support for other Content-Types as they break recommendations.
- Simplified the whole flow in
JsonRpcServer::handle(). - JSON-RPC 2.0: Check against positional and named parameters mixture.
- JSON-RPC 1.1: Check if there are 2 candidate parameters for the same argument. This may happen only in JSON-RPC 1.1 where a positional parameter may overlap a named parameter or viceversa.
- Fill unsent optional parameter with their "default value" or with
NULL. - Fixed #1255006: Return application's error code. Now if the application is responding with an error code it will replace the standard JSON-RPC error codes.