cancel
Showing results for 
Search instead for 
Did you mean: 

Json file parsing

SOLVED
Highlighted
Occasional Contributor

Json file parsing

Hi,

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Json file parsing

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 Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

View solution in original post

2 REPLIES 2
Community Hero

Re: Json file parsing

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


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Community Manager

Re: Json file parsing

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 Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

View solution in original post