我有一个gson.JsonObject对象。从它创建org.json.JSONObject对象的最简单方法是什么?
发布于 2017-05-15 17:57:26
再次从JsonObject获取JSON字符串,并在JSONObject中解析
JsonObject gson = new JsonParser().parse("{\"id\":\"value\"}").getAsJsonObject();
JSONObject jo2 = new JSONObject(gson.toString());发布于 2017-05-15 17:59:59
new org.json.JSONObject(gson.toJson(gson.JsonObject));https://stackoverflow.com/questions/43976443
复制相似问题