Get a value from a Map and convert to the specified type @param map Source map @param key The key @param Target type @return The converted value
(Map<String, Object> map, String key)
| 265 | * @return The converted value |
| 266 | */ |
| 267 | @SuppressWarnings("unchecked") |
| 268 | public static <M extends Map<String, Object>> M getJSONObject(Map<String, Object> map, String key) { |
| 269 | Object obj = get(map, key); |
| 270 | return (M) obj; |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * Get a value from a Map and convert to the specified type |