Function that deals with the raw output of the ensemble and
creates a working JSON dictionary out of it.
It seems that JSON does not like strings that contain dictionaries which have a number as a key, but more specifically it is the fact that binary-c outputs as 5e2 instead of
e.g. with python 3.6.4: json.loads("{5e2: 10}") leads to a JSONDecodeError. To fix this, I do the following:
with ensemble_output being the literal string of output, and json_output the correct jsonified version of that.