Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialization of UUID mismatches that of other bson library #87

Open
thautwarm opened this issue May 23, 2018 · 0 comments
Open

Deserialization of UUID mismatches that of other bson library #87

thautwarm opened this issue May 23, 2018 · 0 comments
Labels

Comments

@thautwarm
Copy link

I've just found a problem when doing message passing with other languages,
look at this binary file:

8a00 0000 0578 636f 6d63 6c73 6964 0010
0000 0004 6cce a4f1 319a 7944 b7c0 5e1e
7ab8 15b3 1069 6400 0000 0000 056d 6574
686f 6400 1000 0000 0462 9057 b338 1afe
4389 4f08 a734 8131 1504 7061 7261 6d73
0038 0000 0003 3000 3000 0000 0574 7970
6500 1000 0000 04b2 66f4 bb31 b187 4b90
a5f6 a426 b05c bf02 6461 7461 0006 0000
0078 203d 2031 0000 0000

It'll be deserialized to the following one by py-bson

{'xcomclsid': UUID('6ccea4f1-319a-7944-b7c0-5e1e7ab815b3'),
 'id': 0,
 'method': UUID('629057b3-381a-fe43-894f-08a734813115'),
 'params': [{'type': UUID('b266f4bb-31b1-874b-90a5-f6a426b05cbf'),
   'data': 'x = 1'}]}

However, Newtonsoft.Json gets

{
  "xcomclsid": "f1a4ce6c-9a31-4479-b7c0-5e1e7ab815b3",
  "id": 0,
  "method": "b3579062-1a38-43fe-894f-08a734813115",
  "params": [
    {
      "type": "bbf466b2-b131-4b87-90a5-f6a426b05cbf",
      "data": "x = 1"
    }
  ]
}

What's wrong with the case?
Thanks for you help!

@Parkayun Parkayun added the bug label May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants