Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invalid integer string convertion from PHP serialized .msgpack #226

Copy link
Copy link
Open
@RemiLelaidier

Description

@RemiLelaidier
Issue body actions

Hi,

I am currently working on a project where I serialize JSON objects using the php library msgpack-php, but when I try to deserialize these objects using the javascript library msgpack-javascript, my integers are truncated.

PHP :

$data = [
    '7355750935770677725' => "test",
];

$msg = msgpack_pack($data);

...

JS :

import { decode } from '@msgpack/msgpack';

const decoded = decode(entry);

console.log(decoded)

Result :

{  '7355750935770677000': 'test'  }

As you can see the last three digits of my integer are set to 0.

This seems to be an interoperability problem between the php library and Node.js

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.