Answers for "json.dump pthon"

4

python json.dumps pretty print

json.dumps(x, indent=4)
Posted by: Guest on September-23-2020
1

json load

import json

with open('path_to_file/person.json') as f:
  data = json.load(f)

# Output: {'name': 'Bob', 'languages': ['English', 'Fench']}
print(data)
Posted by: Guest on October-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language