Limit how much of the source is echoed into an exception message; sources can be many megabytes, and the parse position is already reported by the underlying cause.
(String text)
| 213 | * megabytes, and the parse position is already reported by the underlying cause. |
| 214 | */ |
| 215 | private static String abbreviate(String text) { |
| 216 | return text.length() <= 512 ? text : text.substring(0, 512) + "..."; |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * Deserialize the JSON string supplied by the specified {@code Reader} into an object of the |