Json->Object->T 泛型

private static T getTargetClass(String resultString, T t) {

         System.out.println(resultString);

         JSONObject result = JSONObject.fromObject(resultString);

         return (T) JSONObject.toBean(result, t.getClass());

}

你可能感兴趣的:(Json->Object->T 泛型)