MCPcopy Create free account
hub / github.com/FongMi/CatVodSpider / safeObject

Method safeObject

app/src/main/java/com/github/catvod/utils/Json.java:17–24  ·  view source on GitHub ↗
(String json)

Source from the content-addressed store, hash-verified

15 }
16
17 public static JsonObject safeObject(String json) {
18 try {
19 JsonObject obj = parse(json).getAsJsonObject();
20 return obj == null ? new JsonObject() : obj;
21 } catch (Throwable e) {
22 return new JsonObject();
23 }
24 }
25}

Callers 1

initMethod · 0.95

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected