(String json)
| 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 | } |