This string is returned to my app:
[
{
"object1": "here",
"morekeys": "can also have objects as values"
}
{
"object2": "here",
"morekeys": "can also have objects as values"
}
]
The string is not valid JSON. All that's missing is the comma between the two valid JSON objects.
What's the best method to turn this string into valid JSON with Python?
Edit:
The string is the result of calling subprocess.check_output(), like for example this:
my_string = "[" + subprocess.check_output("command1 && command2", shell=True, stderr=STDOUT) + "]"
Since each command outputs a valid JSON object, I am receiving invalid JSON as a result.