diff options
author | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2015-09-23 11:23:09 -0700 |
---|---|---|
committer | Magnus Feuer <mfeuer@jaguarlandrover.com> | 2015-09-23 11:23:09 -0700 |
commit | 29365b45d1911d42cae9ca7fb9f05829d77c4bb7 (patch) | |
tree | 0cea8149f8958bd2a4c6d4fac723e36e681349ce /python | |
parent | fd8d8205b265abde7639bdbe6c1bdc16a0ecd662 (diff) | |
download | rvi_core-29365b45d1911d42cae9ca7fb9f05829d77c4bb7.tar.gz |
mfeuer_json_params: Fixed rvilib to parse JSON object instead of array of single-element objects
Diffstat (limited to 'python')
-rw-r--r-- | python/rvilib.py | 7 |
1 files changed, 1 insertions, 6 deletions
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 |