I'm building a Web Service in VB.NET and I want to answer using JSON. Currently my answers looks like this
{\"myVar1\" : \"From moscow\", \"myVar2\" : \"With love\"}
I would like to be able to use " (and CarriageReturn), and have the reponse like this :
{"myVar1" : "From moscow", "myVar2" : "With love"}
How can I avoid this transcoding of the " in \" ?
Here is my interface definition :
<OperationContract()>
<WebGet(UriTemplate:="/TemplateGet?ID={id}",
ResponseFormat:=WebMessageFormat.Json,
BodyStyle:=WebMessageBodyStyle.Bare)>
Function TemplateGet(id As String) As String
My answer is plain String :
Function TemplateGet(id As String) As String Implements ISearch.TemplateGet
Dim reponse As String = "{""MyVar1"" : ""From moscow"", ""MyVar2"" : ""With love""}"
Return reponse
End Function