java对象转map @param obj @return
(Object obj)
| 43 | * @return |
| 44 | */ |
| 45 | public static Map<?, ?> objectToMap(Object obj) { |
| 46 | Map userMap = new HashMap(); |
| 47 | if (obj != null) { |
| 48 | userMap = JSON.parseObject(JSON.toJSONString(obj), new TypeReference<Map<String, String>>() { |
| 49 | }); |
| 50 | } |
| 51 | return userMap; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * java对象转map |
nothing calls this directly
no outgoing calls
no test coverage detected