MCPcopy Create free account
hub / github.com/FongMi/TV / safeString

Method safeString

catvod/src/main/java/com/github/catvod/utils/Json.java:56–62  ·  view source on GitHub ↗
(JsonObject obj, String key)

Source from the content-addressed store, hash-verified

54 }
55
56 public static String safeString(JsonObject obj, String key) {
57 try {
58 return obj.getAsJsonPrimitive(key).getAsString().trim();
59 } catch (Exception e) {
60 return "";
61 }
62 }
63
64 public static List<String> safeListString(JsonObject obj, String key) {
65 List<String> result = new ArrayList<>();

Callers 7

jsonParseMethod · 0.95
initLiveMethod · 0.95
parseConfigMethod · 0.95
initWallMethod · 0.95
initSiteMethod · 0.95
safeListStringMethod · 0.95
toMapMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected