I'm developing an application in windows form,I have json data in my mysql database ,column = data '{"money":0,"goal":0,"advantage":0}' I'm trying to pull this data into tags in the form,label1.text="money";label2.text="goal";label3.text="advantage"; I could not find enough resources like this and I am inexperienced in this regard. I uploaded the Json nouget package to my form. output ='{"money":0,"goal":0,"advantage":0}' How can I get json data as I want. Thanks for your help.
MySqlConnection baglan = new MySqlConnection("Server=localhost;Database=json;user=root;Pwd=;");
private void Form1_Load(object sender, EventArgs e)
{
baglan.Open();
MySqlCommand kom = new MySqlCommand("SELECT * FROM player_accounts", baglan);
int count = Convert.ToInt32(kom.ExecuteScalar());
if (count != 0)
{
MySqlDataReader oku = kom.ExecuteReader();
while (oku.Read())
{
listBox1.Items.Add(oku["data"].ToString());
}
baglan.Close();
}
}