I am trying to convert a multiline json to a single line json. So the existing json file I have looks like this:
{
"a": [
"b",
"bill",
"clown",
"circus"
],
"vers": 1.0
}
When I load the file, it comes in a dictionary and not sure how to strip blank spaces in the dictionary.
f = open('test.json')
data = json.load(f)
What I would like it to come out is the following:
{"a":["b","bill","clown","circus"],"vers":1}