making json structure by code in android -


i have following json structure need send server using post request. please in making same structure code in android. json structure follows :

{   "     } } 

since newbie android please help.

use jsonobject class in android, here example:

jsonobject object = new jsonobject(); jsonobject cardacceptorkey = new jsonobject(); try {      //create cardacceptorkey object     cardacceptorkey.put("id","ca-idcode");     cardacceptorkey.put("name","usa");     ...      //create object     object.put("auditnumber", "451035adss");     object.put("cardacceptorkey", cardacceptorkey);     ...  } catch (jsonexception e) {     e.printstacktrace(); } 

more info: http://www.vogella.com/tutorials/androidjson/article.html


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -