cancel
Showing results for 
Search instead for 
Did you mean: 

Json file parsing

SOLVED
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

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

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

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!

View solution in original post