From 29365b45d1911d42cae9ca7fb9f05829d77c4bb7 Mon Sep 17 00:00:00 2001 From: Magnus Feuer Date: Wed, 23 Sep 2015 11:23:09 -0700 Subject: mfeuer_json_params: Fixed rvilib to parse JSON object instead of array of single-element objects --- python/rvilib.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'python') diff --git a/python/rvilib.py b/python/rvilib.py index e790481..f0c30e5 100644 --- a/python/rvilib.py +++ b/python/rvilib.py @@ -176,16 +176,11 @@ class RVI(SimpleJSONRPCServer): # a regular dictionary: {'vin': 1234, hello: 'world'} # print "Parameters:", params['parameters'] - msg_params = params['parameters'] - for i in range(0, len(msg_params)): - for j in range(0, len(msg_params[i].keys())): - # print "params", msg_params[i].keys()[j], "=", msg_params[i].values()[j] - dict_param[msg_params[i].keys()[j]] = msg_params[i].values()[j] # print "Parameter disctionary: ", dict_param # print # Ship the processed dispatch info upward. - return SimpleJSONRPCServer._dispatch(self, params['service_name'], dict_param) + return SimpleJSONRPCServer._dispatch(self, params['service_name'], params['parameters']) # Fallthrough to all other methods. # Will handle service_re3 -- cgit v1.2.1