Hi,
I'm working on webapi project there I'm facing an issue to display the same data that is in Database.
For Example: Data Exist in Database is Sai"Pradeep
- Result objResult = new Result();
- List<Result> lObj = new List<Result>();
- objResult.Description = "Sai\"Pradeep";
- lObj.Add(objResult);
As per the above code I'm getting below output. My focus is on the data in Description field.
{
"results":[
{
"Description" : "Sai\"Pradeep"
}
]
}
My Expectation is
{
"Descripton" : "Sai"Pradeep"
}
I tried using Replace also but none of them works out to me.
When I run in Console project using below code it is working as I expected.
- string desc="Sai\"Pradeep";
- Console.WriteLine(desc);
Output: Sai"Pradeep
It would be great if anyone can help me out in this scenerio.