1. string 轉 object
Type type = new TypeToken<Object>() {}.getType();
Object obj = GsonUtils.fromJson(strValue, type);
2. object轉string
String strValue = (new ObjectMapper()).writeValueAsString(object);
擴展閱讀:
Gson : https://www.cnblogs.com/majay/p/6336918.html
https://www.jianshu.com/p/fc5c9cdf3aab
fastjson : https://www.w3cschool.cn/fastjson/fastjson-api.html
jackson : https://www.yiibai.com/jackson/
