3e3266cf48
* Perform numeric conversion for primitive numeric type adapters This should probably not be visible to the user unless they use the non-typesafe `Gson.toJson(Object, Type)` where unrelated number types can be used, or when malformed generic containers are used. For example a `List<Byte>` containing a Float. This change also has the advantage of avoiding `JsonWriter.value(Number)` for primitive type adapters. That method has some overhead because it needs to make sure that the value is a valid JSON number. However, for primitive numbers this check is redundant. * Don't call `JsonWriter.value(float)` for backward compatibility * Fix typo in comments |
||
---|---|---|
.. | ||
google/gson |