Skip to content

Decoding non-string-able-keyed maps #232

Open
@fillest

Description

@fillest

Hello.
We have some data that is currently encoded with msgpack/msgpack-python and decoded with vmihailenco/msgpack. I'm trying to switch the decoding to msgp. I've added duplicate decoding code and reflect.DeepEqual the results and diffing them when it fails.
Where I'm getting with vmihailenco/msgpack:

 TopicIDs: (map[int]bool) (len=1) {
  (int) 360: (bool) true
 },

with msgp I'm getting TopicIDs: (map[int]bool) <nil> silently. The docs say map must have str or bin keys, is that right? It also says "You can still manually decode arbitrary maps with the primitives built into the library", but how? So:

  1. such decoding silently loses the data, it should at least return an error
  2. how to manually decode such arbitrary maps?

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