Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python-for-beginners/17 - JSON/create_json_from_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
person_dict['City']='Seattle'

# Convert dictionary to JSON object
person_json = json.dumps(person_dict)
person_json = json.loads(person_dict)

# Print JSON object
print(person_json)
print(json.dumps(person_json))
4 changes: 2 additions & 2 deletions python-for-beginners/17 - JSON/create_json_with_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
person_dict['languages']= languages_list

# Convert dictionary to JSON object
person_json = json.dumps(person_dict)
person_json = json.loads(person_dict)

# Print JSON object
print(person_json)
print(json.dumps(person_json))
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
staff_dict ={}
staff_dict['Program Manager']=person_dict
# Convert dictionary to JSON object
staff_json = json.dumps(staff_dict)
staff_json = json.loads(staff_dict)

# Print JSON object
print(staff_json)
print(json.dumps(staff_json))