I have a sqlSever BDD that store some tables with column like decimal(12,6) and it store values like that ie : 1.000000 for only "1" he adds trailing zero automaticly. And when i take those values with linq and return an IActionResult with Ok(myObjectToSerializeInJson) function from webApi .net core 2.2 It results a json that looks like this :
{
"glu": 43.2,
"suc": 5.6,
"lip": null,
"agSat": 17.4,
"pro": 7.1,
"alc": 0,
"orga": 0,
}
But it was before i decided to upgrade some nuget packages that brings me to latest version of json.net (12.0.1) and now the same request return those trailing zeros...
{
"glu": 43.200000,
"suc": 5.600000,
"lip": null,
"agSat": 17.400000,
"pro": 7.100000,
"alc": 0.000000,
"orga": 0.000000,
}
Is it possible to keep the old behavior ?