Ask a Question

Json file parsing

SOLVED
manuelaneena
Occasional Contributor

Json file parsing

Hi,

Is there is a way to parse a json file in python

2 REPLIES 2
cunderw
Community Hero

This should work: https://www.w3schools.com/python/python_json.asp


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
TanyaYatskovska
SmartBear Alumni (Retired)

Thanks for the link, @cunderw.

 

@manuelaneena, based on the suggested article the loads method is what you need. Just load the Json library.

Example from this page:

import json

# some JSON:
x =  '{ "name":"John", "age":30, "city":"New York"}'

# parse x:
y = json.loads(x)

 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: