Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform numeric conversion for primitive numeric type adapters #2158

Commits on Jul 26, 2022

  1. 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.
    Marcono1234 committed Jul 26, 2022
    Copy the full SHA
    0b6937f View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2022

  1. Copy the full SHA
    9768d6b View commit details
    Browse the repository at this point in the history
  2. Fix typo in comments

    Marcono1234 committed Oct 3, 2022
    Copy the full SHA
    e7a5a08 View commit details
    Browse the repository at this point in the history