dimanche 26 avril 2015

JsonConvert.DeserializeObject to datatable automatically round the values


 public DataTable DerializeDataTable()
{
    const string json = @"[{""Name"":""AAA"",""Value"":""22.5"",""Job"":""PPP""},"
                       + @"{""Name"":""BBB"",""Value"":""25.3"",""Job"":""QQQ""},"
                       + @"{""Name"":""CCC"",""Value"":""38.9"",""Job"":""RRR""}]";
    var table = JsonConvert.DeserializeObject<DataTable>(json);
    return table;
}

here after converting to tables the values are coming as 23,25 and 39.

can someone help me please?


Aucun commentaire:

Enregistrer un commentaire