| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 | | package com.zt.common.utils; |  | import com.alibaba.fastjson.JSONObject; |  | import com.fasterxml.jackson.databind.ObjectMapper; |  |   |  | public class JsonUtils { |  |     public static Object toBean(String json,Class classStr){ |  |         return JSONObject.parseObject(json,classStr); |  |         //return null; |  |     } |  |   |  |     public static String toString(Object o){ |  |         return JSONObject.toJSONString(o); |  |     } |  |   |  |   |  | } | 
 |