(转自)https://www.cnblogs.com/robbinluobo/p/7217387.html String.JsonObject.JavaBean 互相转换 User user = new Gson().fromJson(jsonObject, User.class); User user = new Gson().fromJson(string, User.class); String string = new Gson().toJson(user); JsonObject j…