I have a datagridview on my Windows Form Application that takes input from a user. I'd like to use JSON to store this input and am trying to serialize the input from the datagridview into JSON.
So far I have:
private void button2_Click(object sender, EventArgs e)
string output = JsonConvert.SerializeObject(this.dataGridView1);
Always serialize the data itself and not the view.
In this case you have to serialize the
DataSource property of the