Closed GoogleCodeExporter closed 9 years ago
We added two new Exceptions in Gson 1.6: JsonIOException and
JsonSyntaxException. Both of these are subclasses of JsonParseException. If you
have suggestions on improving this design please let us know as soon as
possible before we release Gson 1.6 publicly.
Original comment by inder123
on 3 Nov 2010 at 12:21
I think that sounds great. That's exactly what I was looking for.
Two things, though:
1. There are still two methods that need to be changed:
public void toJson(JsonElement jsonElement, Appendable writer)
public void toJson(Object src, Appendable writer)
2. I have no problems with using unchecked exceptions, but there must be a way
for the user of the API to know which exceptions can be thrown. Either add them
to the javadoc for the methods or to the method signature, i.e.:
public void toJson(JsonElement jsonElement, Appendable writer) throws
JsonIOException
or both. :-)
Thanks for a great API!
Original comment by albin.th...@gmail.com
on 3 Nov 2010 at 6:56
Thanks for the suggestion. r642 declares the exceptions that can be thrown by a
method.
Original comment by inder123
on 3 Nov 2010 at 7:47
Excellent!
Great work!
Original comment by albin.th...@gmail.com
on 3 Nov 2010 at 10:20
Original issue reported on code.google.com by
albin.th...@gmail.com
on 4 Oct 2010 at 1:53