Skip to content

decode number to interface{} as int64 rather than float64 #145

Closed
@thockin

Description

@thockin

I have a case where I need to decode into an interface{} as an int64, rather than float64. Is there a way to request that? Ideally it would be automatic - if the encoded value is a whole number, use int64, else use float64.

stdlib has decoder.UseNumber which is closer to what we need...

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