title: How to insert into json file without deleting the previous data?
body: <p>I am insert data into <code>.json</code> file. My insertion works fine, but I have a problem - when I insert new data, the previous data in the file is deleted. 
  How can I manage that? 
  Also I would need it to be in the format of because I need to query it:  </p>
  
  <pre><code>[
    {
      "Rollnumber": 3,
      "StudentName": "Tapas"
    },
    {
      "Rollnumber": 4,
      "StudentName": "Papas"
    }
  ]
  </code></pre>
  
  <p>When I pass the data as the list.ToArray()(that would be the _data in the code example) I get the [] brackets, but only on the first data with rollnumber = 3.
  This is my code so far:</p>
  
  <pre><code>private void AddStudent()
  {
      Student objStudent = new Student();
      objStudent.Rollnumber = 3;
      objStudent.StudentName = "Tapas";
  
  
      /*  List&lt;Student&gt; _data = new List&lt;Student&gt;();
      _data.Add(new Student()
      {
          Rollnumber = 4,
          StudentName = "Papas"
      });
      */
  
      string jsonData = JsonConvert.SerializeObject(objStudent, Formatting.Indented);
      System.IO.File.WriteAllText(jsonFileS, jsonData);
  }
  </code></pre>
  
  <p>I have tried with the <code>StreamWritter</code> also, but I could not do it.</p>