Changes between Version 6 and Version 7 of Simplistic_json_rpc-dispatcher


Ignore:
Timestamp:
Nov 24, 2009, 4:59:52 PM (15 years ago)
Author:
anonymous
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Simplistic_json_rpc-dispatcher

    v6 v7  
    99jsonrpc_methods = []
    1010
    11 def JSON_RPC_io(obj):
     11def JSON_RPC_dispatcher(obj):
    1212      rpc_inputs = json.loads(obj.raw_post_data)
    1313      sub_eval = str(rpc_inputs['method']) + '(rpc_inputs[\'params\'])'
     
    2929This function works as a decoding/encoding dispatcher between Django's '''HttpRequest'''-object and
    3030arbitrary defined method-functions of the json-rpc service. Those '''method-functions shall return''' a
    31 dictionary-object as '''{'result': <result_data>, 'error': <error_data>}''' and their '''names shall be appended/registered''' to the '''jsonrpc_methods list'''. This dispatcher-function is generally suitable for json-rpc apps handling different data process/validate tasks.   
     31dictionary-object as '''{'result': <result_data>, 'error': <error_data>}''' and their '''names shall be appended/registered''' to the '''jsonrpc_methods list'''. This dispatcher-function is generally suitable for any json-rpc app and neutral to the exact version of the json-rpc protocol in consideration.   
Back to Top