问题 Getting deprecated message for JsonParser for Spring Boot app, JsonObject jsonObject = new JsonParser().parse(result).getAsJsonObject(); What is the alternative? 回答1: Based on the javadoc for Gson 2.8.6 No need to instantiate this class, use the static methods instead. and following are the alternatives to be used. //jsonString is of type java.lang.String JsonObject jsonObject = JsonParser.parseString(jsonString).getAsJsonObject(); //reader is of type java.io.Reader JsonObject jsonObject =