Thank you for this great module. I am now using it as a backend of Drupal + OAuth2.0 service integration. BTW, during development I face some critical bug in json_server and would like to contribute my research progress.
Patch via json_server-6.x-2.x-dev CVS. Changes include:
- Require PHP5.2 by default.
- Improve json_server_server_error() message handling, clone from Drupal 6.x xmlrpc_error() (http://api.drupal.org/api/drupal/includes--xmlrpc.inc/function/xmlrpc_error) and facebook-php-sdk (http://github.com/facebook/php-sdk/); on the other hand, not compatible with legacy implementation.
- Backport drupal_json_encode() (http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_js...) and drupal_json_encode() (http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_js...) from Drupal 7.x implementation.
- Only preform json_decode on arguments unless success, where keep original data format if json_decode fail.
- Simplify argument handling and error control (as most of that are already included in parent services.module, e.g. check missing argument).
- Debug and rename json_load() as json_server_init() so will always load the javascript at the beginning.
- Code clean with code-clean.php
- Coding style cleanup with coder.module.
Fully tested with a "facebook-php-sdk"-like custom OAuth2.0 implementation and basic cURL query. Please feel free to comment with.
| Comment | File | Size | Author |
|---|---|---|---|
| json_server-6.x-2.x-1289901045.patch | 5.22 KB | hswong3i |