i Have table that may contains null values in rows that may lead to null at client side.. so i want empty in place of null..
if i send Json String it give double quotes around string.. but i Wanna treat this is json object..
like this
"[
{
"BusinessEntityID":274,
"TerritoryID":"",
"SalesQuota":"",
"Bonus":0.0000,
"CommissionPct":0.0000,
"SalesYTD":559697.5639,
"SalesLastYear":0.0000,
"rowguid":"48754992-9ee0-4c0e-8c94-9451604e3e02",
"ModifiedDate":"2005-01-28T00:00:00"
},
{
"BusinessEntityID":275,
"TerritoryID":2,
"SalesQuota":300000.0000,
"Bonus":4100.0000,
"CommissionPct":0.0120,
"SalesYTD":3763178.1787,
"SalesLastYear":1750406.4785,
"rowguid":"1e0a7274-3064-4f58-88ee-4c6586c87169",
"ModifiedDate":"2005-06-24T00:00:00"
}
]"
but i wanna treat this is json object while sending string to response
DataTable dt = (new tst()).Gettable();
string s = string.Empty;
s = Newtonsoft.Json.JsonConvert.SerializeObject(dt);
return Ok(s);
if i return s then output at client side treated as string. and if i return dt then it show null for empty cells.
but i wanna replace null with "" without making string.
Please dont give silly answsers..To the Point.
Having Problem in understanding question ..then you can ask
I have solve this by making overhead to code by here