Update fromJson Javadoc. (#1151)

For the string-based fromJson() method, mention that the result will be null if the given string is empty.
This commit is contained in:
Nels Beckman 2017-09-18 01:08:22 -06:00 committed by inder123
parent 7a9fd5962d
commit ddcd6aea7d

View File

@ -765,7 +765,8 @@ public final class Gson {
* @param <T> the type of the desired object
* @param json the string from which the object is to be deserialized
* @param classOfT the class of T
* @return an object of type T from the string. Returns {@code null} if {@code json} is {@code null}.
* @return an object of type T from the string. Returns {@code null} if {@code json} is {@code null}
* or if {@code json} is empty.
* @throws JsonSyntaxException if json is not a valid representation for an object of type
* classOfT
*/