摘要:
GSON jar包:http://code.google.com/p/google-gson///java object to jsonpublic String toJson(Object obj){ Gson gson = new Gson(); return gson.toJson(obj);}//json to java objectpublic Object toObject(String jsonStr, Class c){ Gson gson = new Gson(); return gson.fromJson(jsonStr, c);}jackson j... 阅读全文