I have a test web MVC web service that is returning JSON data.   I am
not able to deserialze the data returned:

This doesn't work (BodyStyle = Bare):

"{\"MemberID\":\"88831472\",\"MemberUserName\":\"Yang Yi\",
\"MemberFirstName\":\"Yang\",\"MemberFamilyName\":\"Liu\",
\"ThumbnailFilename\":\"88831472_Image_1.jpg\"}"

This doesn't work (BodyStyle = Wrapped):

{"GetMemberResult":"{\"MemberID\":\"88831472\",\"MemberUserName\":
\"Yang Yi\",\"MemberFirstName\":\"Yang\",\"MemberFamilyName\":\"Liu\",
\"ThumbnailFilename\":\"88831472_Image_1.jpg\"}"}

I created the string manually which works:

"{\"GetMemberResult\":{\"MemberFamilyName\":\"Liu\",\"MemberFirstName
\":\"Yang\",\"MemberID\":\"88831472\",\"MemberUserName\":\"Yang Yi\",
\"ThumbnailFilename\":\"88831472_Image_1.jpg\"}}"

According to what I have learned so far I expected all three to be
valid JSON data.  Can anyone tell me why I can't deserialize the first
two examples?  I have tried:

org.json.JSONObject
and
com.google.gson.*

Both have the same issue with the JSON data.

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to