Changes between Version 1 and Version 2 of Simplistic_json_rpc-dispatcher
- Timestamp:
- Sep 15, 2009, 10:24:56 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Simplistic_json_rpc-dispatcher
v1 v2 12 12 rpc_inputs = jsonrpc.json.loads(object.raw_post_data) 13 13 sub_eval = str(rpc_inputs['method']) + '(rpc_inputs[\'params\'])' 14 if rpc_inputs['method'] in methods 14 if rpc_inputs['method'] in methods: 15 15 result = eval(sub_eval) 16 16 json_retur = jsonrpc.json.dumps({'result': result['result'], 'error': result['error'], 'id': rpc_inputs['id']})