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); } }


上一篇:
下一篇:
切换中文