Skip to content

integer 、long toObject is deouble,This leads to many problems #1622

@yuedaxia76

Description

@yuedaxia76

this:#1580
#1257
#1084
It is recommended to modify the ObjectTypeAdapter or allow to override the default implementation.
like this:
case NUMBER:

            String n = in.nextString();
            
            if (n.indexOf('.') == -1) {
                return Long.parseLong(n);
            }
            return Double.parseDouble(n);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions