How can I force Python to stop writing my .json
file to one line? I've tried changing the write command with open('manifest.json', 'wb') as f:
to with open('manifest.json', 'w') as f:
but it is still writing to one line.
Code
import json
with open('manifest.json', 'r') as f:
json_data = json.load(f)
json_data['server-version'] = "xxxx-x.x.x"
with open('manifest.json', 'w') as f:
f.write(json.dumps(json_data))
print('Successful.')