import org.json.JSONObject;
public class JSONExample {
public static void main(String[] args) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", "John");
jsonObject.put("age", 25);
jsonObject.put("city", "New York");
String jsonString = jsonObject.toString();
System.out.println(jsonString);
}
}