MCPcopy Index your code
hub / github.com/Tencent/APIJSON / parseArray

Method parseArray

APIJSONORM/src/main/java/apijson/JSON.java:136–149  ·  view source on GitHub ↗

@param json @return

(Object json)

Source from the content-addressed store, hash-verified

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);

Callers 3

getArgListMethod · 0.95
getArgValueMethod · 0.95
getArgValMethod · 0.95

Calls 4

toJSONStringMethod · 0.95
isEmptyMethod · 0.95
iMethod · 0.95
parseArrayMethod · 0.65

Tested by

no test coverage detected