This is used to create JSON objects using Java
1 2 3 4 5 6 7 8 | import org.json.JSONObject; //Creating JSON object JSONObject json = new JSONObject(); //Put tag name and value to the object json.put( "city" , "Mumbai" ); json.put( "country" , "India" ); String output = json.toString(); |