Skip to content

decode ints as float64 #152

Open
Open
@jonasfj

Description

@jonasfj

I get msgp: attempted to decode type "int" with method for "float64"

Server has an float64 and client is a node sending a number... I guess the node library encodes the number as an int to get the smallest possible wire format.

Clearly, int8, int16, int32 can all be decoded to a float64. I know this because js always uses double (float64) which is precise up-to 53bits. Hence, it can hold both int8, int16, and int32.

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