Return string with backslash

17 views
Skip to first unread message

Azri Jamil

unread,
Jul 29, 2013, 12:06:24 PM7/29/13
to spring...@googlegroups.com
I have successfully create an SpringPad C# lib. using OAuth lib. from DevDefined. But my problem is, the return string fill with backslash. So i need to stripslash the string using own function. Is there any proper way to handle with this situation.

Regards,
AJ

Chuck Garofalo

unread,
Jul 29, 2013, 12:28:39 PM7/29/13
to spring...@googlegroups.com
Hi AJ.  

Can you provide some more details about what api call you are making?  It would be helpful to know the api endpoint, the response and your expected response.

Thanks,
Chuck

Azri Jamil

unread,
Jul 29, 2013, 12:50:02 PM7/29/13
to spring...@googlegroups.com
This is code use to get the response.

String dataString = session.Request().Get().ForUrl(this.baseUrl + url).ToString();

This is partial response by SpringPad server

"[\n  {\n  \"uuid\":\"/UUID(363d0663-b170-4131-bca0-f1916e1c6a36)/\",\n  \"contentId\":\"363d0663-b170-4131-bca0-f1916e1c6a36\",\n  \"type\":\"/Type(Bookmark)/\",\n  \"creator\":\"/UUID(3649ed8f-7a23-49ec-83ac-741fe558a7bf)/\" }\n ]"

Backslashes have been added to the string. Is this normal and how to overcome this.

Regards,

Chuck Garofalo

unread,
Jul 30, 2013, 7:34:11 AM7/30/13
to spring...@googlegroups.com
Hi AJ,

The backslashes you see there are not from our api response.  It looks like the string needs to be "unescaped".  For instance, the "\n" characters are representing the newlines that we respond with.  

I hope this helps.

Regards,
Chuck
Reply all
Reply to author
Forward
0 new messages