title: How to write multiple json files in python?
body: <p>First of all, I would like to ask what is a typical format of JSON file with multiple objects?</p>
  
  <p>Is it a list of objects like: <code>[ {...}, {...} ... ]</code>?</p>
  
  <p>Second, I tried to store multiple <code>dict</code> to a single <code>JSON</code> file using python.</p>
  
  <p>I have two JSONs:</p>
  
  <pre><code>test_data = {'profile_img': 'https://fmdataba.com/images/p/4592.png',
   'name': 'Son Heung-Min ',
   'birth_date': '8/7/1992',
   'nation': 'South Korea KOR',
   'position': 'M (R), AM (RL), ST (C)',
   'foot': 'Either'}
  </code></pre>
  
  <p>and</p>
  
  <pre><code>test_data2 = {'profile_img': 'https://fmdataba.com/images/p/1103.png',
   'name': 'Marc-André ter Stegen ',
   'birth_date': '30/4/1992',
   'nation': 'Germany',
   'position': 'GK',
   'foot': 'Either'}
  </code></pre>
  
  <p>then I did</p>
  
  <pre><code>with open('data.json', 'w') as json_file:  
      json.dump(test_data, json_file, indent=2)
      json.dump(test_data2, json_file, indent=2)
  </code></pre>
  
  <p>Of course, I would have iterated a list of <code>dict</code>s to store multiple <code>dict</code>s, but I just did this for now to test if the format is correct. The result <code>.json</code> file looks like</p>
  
  <p><strong>data.json</strong></p>
  
  <pre><code>{
    "profile_img": "https://fmdataba.com/images/p/4592.png",
    "name": "Son Heung-Min ",
    "birth_date": "8/7/1992",
    "nation": "South Korea KOR",
    "position": "M (R), AM (RL), ST (C)",
    "foot": "Either"
  }{
    "profile_img": "https://fmdataba.com/images/p/1103.png",
    "name": "Marc-Andr\u00e9 ter Stegen ",
    "birth_date": "30/4/1992",
    "nation": "Germany",
    "position": "GK",
    "foot": "Either"
  }
  </code></pre>
  
  <p>It seems pretty weird because there is not <code>,</code> between two objects. 
  What is the typical way of doing this?</p>