strings returned by wcf wrapped with extra quotes
I'm stuck with this problem for the last 2 days:
I have server running WCF JSON service that returns type: string.
The client that consumes this service is Android application.
The problem:
The string returned by the WCF service seems to be fine (for example: "result_1"), but the value in the Android application looks like this: ""result_1"" (note the problematic extra quotes.开发者_运维技巧..).
What should i do in order to fix this? Thanks.
I have had this problem with iPhone
developers in my workplace. The workaround I used was returning a custom class object instead of String
like following:
public class StringContainer
{
public String Value { get; set; }
}
精彩评论