I have my button that serializes my object that I use it in this way:
private void btnJson_Click(object sender, EventArgs e)
{
OleDbConnection connection = MSAConnection.getConnection();
string sql = "SELECT * FROM Persona";
OleDbDataAdapter d = new OleDbDataAdapter(sql, connection);
DataSet ds = new DataSet();
d.Fill(ds,"Persona");
string n = JsonConvert.SerializeObject(ds);
textBox1.Text = n;
}
everything is fine.
this is what it shows me:
{
"Persona": [
{
"Id": 777,
"nombreCompleto": "CARLOS MANUEL",
"fecha": "2018-03-01T00:00:00",
"hora": "1899-12-30T15:43:35"
}
]
}
want to know if there is a way to serialize it like this:
{
"Persona": [
{
"Id": 777,
"nombreCompleto": "CARLOS MANUEL",
"fecha": "2018-03-01",
"hora": "15:43:35"
}
]
}