title: List of lists of objects to JSON with Python
body: <p>I have a List with multi lists of objects:</p>
  
  <pre><code>ob = Obj()
  for p in l:
      list_url_commune = scrapingCities(base_url, p)
      for u in list_url_commune:
          list_name = scaping_creches(base_url, u, number_page)
          list_dep.append(list_name)
  
   json_string = json.dumps([ob.__dict__ for ob in list_dep])
   print json_string
  </code></pre>
  
  <p><strong>list_dep</strong> is the list with all the lists with Objects</p>
  
  <p>Then, I would like to convert all the Objects in only <strong>one JSON</strong>.</p>
  
  <p>In my case, I have an error with <code>json.dumps([ob.__dict__ for ob in list_dep])</code></p>
  
  <p>(notice: it works fine if I have only one list but here it is a List of lists)</p>
  
  <pre><code>AttributeError: 'list' object has no attribute '__dict__'
  </code></pre>
  
  <p>Thanks for your help !</p>
  
  <p>Pedro</p>