Parse JSON in Python

0 votes

I am not able to parse my data from a JSON file in python. Below is the code:

import json

employee_data='''

{

"people":[

{

"name":"abc",

"email":["aaew@yahoo.com","hdiefh@gmail.com"],

"married":false

},

{

"name":"def",

"email":["aaffidf@gmail.com","gfdg@gmail.com"],

"married":false

}

]}

'''
Apr 26, 2018 in Python by geek.erkami
• 2,320 points
59 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
import json

data=json.loads(employee_data)

print(data)

answered Apr 26, 2018 by aayushi
• 750 points

Related Questions In Python

0 votes
1 answer

How can I convert a list of dictionaries from a CSV into a JSON object in Python?

You could try using the AST module. ...READ MORE

answered Apr 17, 2018 in Python by anonymous
470 views
0 votes
2 answers

Extracting data from a JSON file in Python

Here is what i found and was ...READ MORE

answered Nov 27, 2018 in Python by Rupali
4,693 views
0 votes
1 answer

Convert string list of dict from csv into JSON object in python

You can use the ast module Ex: import ast s = """[{'10': ...READ MORE

answered Sep 12, 2018 in Python by Priyaj
• 56,140 points
292 views
0 votes
1 answer

Convert string list of dict from csv into JSON object in python

You can use the ast module Ex: import ast s = """[{'10': ...READ MORE

answered Sep 24, 2018 in Python by Priyaj
• 56,140 points
50 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
54 views
+2 votes
11 answers

How to print array/ list without brackets in python?

name=["a","b","c"] print (', '.join(name)) It will simply take all ...READ MORE

answered Apr 18, 2018 in Python by aayushi
• 750 points
13,867 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.