?
Solved

Remove \ from JSON in C#

Posted on 2014-03-21
2
Medium Priority
?
2,551 Views
Last Modified: 2014-03-28
I am getting JSON Data like below,But I can not remove "\" from the below output. I am using C#.I have used replace method in c# to remove \ , but no result.

"[{\"Security\":\"OFS IB Equity\",\"Display\":\"ODYSSEYCORP, BSE, INDIA\",\"Esignal\":\"\"},{\"Security\":\"OFS IB Equity\",\"Display\":\"ODYSSEYCORP, BSE, INDIA\",\"Esignal\":\"\"},{\"Security\":\"OFS IB Equity\",\"Display\":\"ODYSSEYCORP, BSE, INDIA\",\"Esignal\":\"\"},{\"Security\":\"OFS IB Equity\",\"Display\":\"ODYSSEYCORP, BSE, INDIA\",\"Esignal\":\"\"},{\"Security\":\"OFS IB Equity\",\"Display\":\"ODYSSEYCORP, BSE, INDIA\",\"Esignal\":\"\"}]"
0
Comment
Question by:dynamicweb09
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Expert Comment

by:Luis Pérez
ID: 39945582
Can you post what you've tried?
0
 
LVL 20

Accepted Solution

by:
Daniel Van Der Werken earned 1500 total points
ID: 39946399
I'm not sure what your end-purpose is. In C#, the string, "\"" is in fact, actually the quote symbol in a string. In effect, this is """. So, you'd have a string like this:

string myString = "\"Hello\""; // string is "Hello" not Hello

Open in new window


You can't really "remove" the \" from a string and keep it a valid string.

You could try this:
string xyz = jsonData.Replace('\"',' ');

Open in new window


That will replace the quote with a space. Maybe that will be what you need?
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question