I am trying to perform a simple convert operation on my string. The objective is to convert my string to json format.
string clientID= newClient.GetClientId();
string clientSecret = "ZDUyYTYyMjYtMTcyNC00ODkxLWI2NmMtMDlhZjA3MDdiOGQ2";
var stringObject= "{ clientID:"+ "'"+clientID+"', clientSecret:"+"'"+clientSecret+"'}" ;
var json= new JavaScriptSerializer().Serialize(stringObject);
However when i print the json ..The output shows something like this:
"{ clientID:\u0027YmY3NjZkM2ItZDg3MC00ZjQwLTk1NjktNTE0N2M1YzExOWMx\u0027, clientSecret:\u0027ZDUyYTYyMjYtMTcyNC00ODkxLWI2NmMtMDlhZjA3MDdiOGQ2\u0027}\"
How do i remove unnecessary \u0027 ?