import com.google.gson.Gson; import org.json.JSONObject; // ... JSONObject json = new JSONObject("{\"name\":\"John Smith\",\"age\":30}"); Gson gson = new Gson(); Person person = gson.fromJson(json.toString(), Person.class);
标签:java,JSONObject,gson,json,转成,new,Gson From: https://www.cnblogs.com/tiandi/p/17328275.html