(JsonObject obj, String key)
| 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<>(); |
no outgoing calls
no test coverage detected