Skip to content

Commit

Permalink
Python Deserialize JSON String to Object
Browse files Browse the repository at this point in the history
Python Deserialize JSON String to Object
  • Loading branch information
toricode authored Dec 23, 2019
1 parent 50a9fa2 commit 4b36cec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deserialize_json_string.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import json

json_data = '{"firstName": "Larry", "lastName":"Scott", "email": "[email protected]"}'

json_object = json.loads(json_data)

print("Object type: ", type(json_object))
print("First Name: ", json_object['firstName'])
print("Last Name: ", json_object['lastName'])
print("Email Address: ", json_object['email'])

0 comments on commit 4b36cec

Please sign in to comment.