0

I want to consume a json webservice. When i fire the webrequest, .NET is adding \n and \" to the result.

I tried WebRequest and RestSharp. But i cant deserialize because of this characters.

result in internet explorer:

{
 "resultCount":1,
 "results": [
{"wrapperType":"track", "kind":"feature-movie", "trackId":279990601, "artistName":"....

result in .NET: (another request)

"\n\n\n{\n \"resultCount\":50,\n \"results\": [\n{\"kind\":\"software\", \"features\":[\"iosUniversal\"]

Thank you for your help

David

Ravi Y
  • 4,296
  • 2
  • 27
  • 38
David Müller
  • 97
  • 2
  • 8
  • Does the value actual contain the text `\n` and `\"`, or does it just have newlines and quotation marks? – JLRishe Jan 24 '13 at 12:00

1 Answers1

1

That's just visual studio adding escape characters in the variable inspector. They're not being added in the background, your actual variables don't contain these extra characters. \n means new line and \" escapes the " character.

mattmanser
  • 5,719
  • 3
  • 38
  • 50