Correct way to return a C# object to Android via RESTful JSON webservice -
when returning data wcf restful webservice via json android app, i've designed webservice follow request/response pattern, ie
public getstoryseedsresponse getstoryseeds(getstoryseedsrequest request) { ... }
this ok request, create jsonobject
in android , set post body, , wcf seems receive , decode getstoryseedsrequest
object. problem when return above response object, contains list<storyseed>()
storyseed class has whole number of parameters, including image data. when try , decode jsonobject in android so
string responseentity = entityutils.tostring(response.getentity()); jsonobject seeds = new jsonobject(responseentity);
it timing out , array length seems blow out ide, i'm assuming i'm handling response android via json incorrectly.
what correct way this?
Comments
Post a Comment