3 ms·
I wrote a MessagePack to JSON conversion tool which is ideal for viewing MessagePack. It supports a pseudo-JSON debug output so you can view messages even when
by ludocode 7y ago
I wrote a MessagePack to JSON conversion tool which is ideal for viewing MessagePack. It supports a pseudo-JSON debug output so you can view messages even when they use features outside of JSON, like binary blobs or arbitrary key types:
https://github.com/ludocode/msgpack-tools https://github.com/ludocode/msgpack-tools
It works best if you use MessagePack like JSON where all map (object) keys are strings, so you can easily understand a message without context. If you want to optimize your MessagePack more, you would tend to use integers for map keys, but this makes the JSON-equivalent view not super clear because you just see a bunch of numbers in a tree structure.
- elcritch 7y agoThanks! Your `msgpack-tools` are really handy. When I use MessagePack usually I'll add it as an option to an endpoint (`/api/request/123?type=mpack`) in addition to json but there's still cases where having a mpack-to-json tool comes in handy.