How to send a JSON object(in get method) over Request with Android? -
i want send following parameter
data={"method": "category", "parameter": {"id":20, "language":"en"}}
to web service how can android method? tried did not work.
your json created :
try { jsonobject jsonobject = new jsonobject(); jsonobject.put("method", "category"); jsonobject jsonobject1 = new jsonobject(); jsonobject1.put("id", 20); jsonobject1.put("language", "en"); jsonobject.put("parameter",jsonobject1 ); } catch (jsonexception e) { e.printstacktrace(); }
now can add in request key "data"
Comments
Post a Comment