2020
10-08
10-08
Json字符串转Java对象和List代码实例
对象POJO和JSON互转publicclassJsonUtil{/***JSON转POJO*/publicstatic<T>TgetObject(Stringpojo,Class<T>tclass){try{returnJSONObject.parseObject(pojo,tclass);}catch(Exceptione){log.error(tclass+"转JSON失败");}returnnull;}/***POJO转JSON*/publicstatic<T>StringgetJson(TtResponse){Stringpojo=JSO...
继续阅读 >