Reputation: 11
I'm not quite sure on how you write a JSON
so can you please help me, i'm trying to make this with JSON
in python
. Here's the pseudo-code
binary_students = json(students)
write_to_the_file_system(binary_students)
I'm not quite understanding it, can someone help me please.
Upvotes: 0
Views: 108
Reputation: 29307
You can use a dictionary for storing Json data like this:
>>> dict = {'Student1':'x1','Student2':'x2'}
and then use the json
library
>>> import json
>>> with open('data.txt', 'w') as outfile:
json.dump(dict,outfile)
Upvotes: 1