@param json @return
(Object json)
| 134 | * @return |
| 135 | */ |
| 136 | public static <L extends List<Object>> L parseArray(Object json) { |
| 137 | String s = toJSONString(json); |
| 138 | if (StringUtil.isEmpty(s, true)) { |
| 139 | return null; |
| 140 | } |
| 141 | |
| 142 | try { |
| 143 | L arr = (L) DEFAULT_JSON_PARSER.parseArray(s); |
| 144 | return arr; |
| 145 | } catch (Exception e) { |
| 146 | Log.i(TAG, "parseArray catch \n" + e.getMessage()); |
| 147 | } |
| 148 | return null; |
| 149 | } |
| 150 | |
| 151 | public static <T> List<T> parseArray(Object json, Class<T> clazz) { |
| 152 | String s = toJSONString(json); |
no test coverage detected