Solved

Remove \ from JSON in C#

Posted on 2014-03-21
2
2,393 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

719 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