Reputation: 83677
I have found lots of online tutorials but all of them are deserializing JSON strings into objects or lists of objects.
I just have a web service which returns either 1 or 0 as JSON.
So it prints something like:
""\"0\""
Or:
""\"1\""
How can I deserialize a simple JSON like that into a string?
Upvotes: 0
Views: 507
Reputation: 78242
According to the RFC4627 a valid JSON string is defined as either a JSON object or a JSON array. Your web service should return something similar to this.
{ "Result": 0 }
Upvotes: 1