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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -