| 2390 | } |
| 2391 | |
| 2392 | public static void setProperty(Object obj, Object property, Object defaultValue) { |
| 2393 | if (obj == null || property == null) { |
| 2394 | return; |
| 2395 | } |
| 2396 | |
| 2397 | try { |
| 2398 | Class<?> clazz = obj.getClass(); |
| 2399 | String propName = property.toString(); |
| 2400 | |
| 2401 | try { |
| 2402 | java.lang.reflect.Field field = clazz.getDeclaredField(propName); |
| 2403 | field.setAccessible(true); |
| 2404 | field.set(obj, defaultValue); |
| 2405 | return; |
| 2406 | } catch (NoSuchFieldException ignored) {} |
| 2407 | |
| 2408 | } |
| 2409 | catch (Exception e) { |
| 2410 | } |
| 2411 | } |
| 2412 | |
| 2413 | public String fixStringifiedJsonMembers(Object content) { |
| 2414 | String str = (String)content; |