Forum Discussion

manuelaneena's avatar
manuelaneena
Occasional Contributor
6 years ago

Json file parsing

Hi, Is there is a way to parse a json file in python
  • TanyaYatskovska's avatar
    TanyaYatskovska
    6 years ago

    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)