Skip to content

[BUG] Gson deserialization treats integers as doubles, breaking downstream serializers #622

@jamiesanson

Description

@jamiesanson

Is there an existing issue for this?

  • I have searched the existing issues

SDK Version

4.4.0

Current Behavior

When using JSON variables with GsonConfigParser, integers within JSON variables appear as doubles to outside consumers. The Map output then can't be returned to valid JSON for use with downstream JSON parsing tools, like kotlinx.serialization.

Expected Behavior

Integer-looking JSON values are deserialized to longs, while decimal-looking JSON values are deserialized to doubles.

Steps To Reproduce

See associated pull request.

Java Version

21

Link

No response

Logs

No response

Severity

Minor issue

Workaround/Solution

Re-interpret doubles as integers where needed.

Recent Change

No response

Conflicts

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions