Better error messages when json parsing fails
@@ -58,6 +58,8 @@ public String toJson(Object toConvert) {
try (StringReader reader = new StringReader(source);
JsonInput json = newInput(reader)) {
return fromJson.coerce(json, typeOfT, setter);
+ } catch (JsonException e) {
+ throw new JsonException("Unable to parse: " + source, e);
}
}
