This method serializes the specified object into its equivalent JSON representation. This method should be used when the specified object is not a generic type. This method uses Class#getClass() to get the type for the specified object, but the getClass() loses the generic type infor
(Object src)
| 540 | * @see #toJson(Object, Type) |
| 541 | */ |
| 542 | public String toJson(Object src) { |
| 543 | if (src == null) { |
| 544 | return toJson(JsonNull.INSTANCE); |
| 545 | } |
| 546 | return toJson(src, src.getClass()); |
| 547 | } |
| 548 | |
| 549 | /** |
| 550 | * This method serializes the specified object, including those of generic types, into its |