title: Nested Dictionary JSON to Nested Dictionary in Python
body: <p>I have a dictionary of dictionaries in Python which looks like this:</p>
  
  <pre><code>  {      
     "Europe": {
          "France": (10,5),
          "Germany": (15,5),
          "Italy": (5,15),
        },
  "North-America": {
          "USA": (20,0),
          "CANADA": (12,4),
          "MEXICO": (14,8),
         },
   }
  </code></pre>
  
  <p>I want to save the dictionary in a JSON file to get the data when I need it.
  I do that store like this:</p>
  
  <pre><code>with open(filename, 'a') as jsonfile:
      json.dump(dictionary, jsonfile)
  </code></pre>
  
  <p>The problem comes now. When I try to read the stored json dictionary I get same Error like this: <a href="https://stackoverflow.com/questions/21058935/python-json-loads-shows-valueerror-extra-data">Python json.loads shows ValueError: Extra data</a></p>
  
  <p>The answer in that post is just to store the different dicts in a list and dumps all of them. But I dont understand how to do it if they are nested and they are created dynamically.</p>
  
  <p>The way I read the json is this:</p>
  
  <pre><code>jsonFile = open(filename)
  data = json.loads(jsonFile)
  jsonFile.close()
  return data
  </code></pre>
  
  <p>In resume. I need to load the dictionary from the json file to a dictionary in python. How can I achieve that? </p>