google / identity-toolkit-java-client

Google Identity Toolkit client library for Java
Apache License 2.0
37 stars 27 forks source link

Replaced Json with Gson to rid of its dependency #39

Open acwwat opened 8 years ago

acwwat commented 8 years ago

Per issue #33, I have replaced Json usages with that of Gson. However I have some concerns:

  1. Since JSONException references have to be removed, it had to be removed from numerous method signatures.
  2. Gson throws RuntimExceptions instead of Exceptions on object type incompatibility. This changes some exception handling behaviour vs. Json which uses JSONException. The updated code will just let RuntimeExceptions trickle up.
  3. Gson API is not fluent and requires more chained calls.

Please review and see if these are OK when reviewing the pull request. If it's too much risk we can leave the original code alone. Thanks.

liujin-google commented 8 years ago

Thank you Anthony for the pull request. Reducing dependencies does make sense, but I share the same concern that probably too many changes are involved. Also we need to guarantee the backward compatibility with existing developers' code using the Identity Toolkit library. We are thinking of a new library version and will put the Json/Gson redundancy into consideration. Due to these reasons, I incline to close the pull request.