Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

go.shabbyrobe.org/msgplens

Package Overview
Dependencies
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.shabbyrobe.org/msgplens

Go Modules
Version
v0.0.0-20250824062523-1059b8dea02e
Version published
Created
Source

msgplens: Msgpack inspection tool

Go Reference

Swiss-army knife for inspecting msgpack objects.

msgplens screenshot

To install:

go install go.shabbyrobe.org/msgplens/cmd/msgplens@latest

msgplens has the following features:

  • Pretty-print msgpack objects
  • Lossless JSON representation (-inf repr, -outf repr)
  • Lossy JSON representation (-inf json, -outf json)
  • Accepts several different input encodings (-inenc b64, -inenc hex, etc)
  • Everything useful is exported from the go.shabbyrobe.org/msgplens library

And the following drawbacks:

  • Code is not pretty yet
  • Not much in the way of tests either
  • Code quality is a bit of a mixed bag at the moment so the API isn't super stable

This tool cribs heavily from the unexported portions of http://github.com/tinylib/msgp, though it would be great if it could be exported and used as a dependency instead!

Examples

You can chop and dice inputs and outputs any way you like.

Read base64 encoded msgpack from STDIN, pretty print:

$ echo "gA==" | msgplens -inenc b64
at:0   sz:1   0x80 (128) Fixmap   len:0 {}

Read base64 encoded msgpack from STDIN, convert to lossy JSON:

$ echo "gaFhoWI=" | ./msgplens -inenc b64 -outf json
{"a":"b"}

Read hex encoded JSON from STDIN, pretty print:

$ echo '{"a": "b"}' | xxd -ps | ./msgplens -inf json -inenc hex
at:0   sz:1   0x81 (129) Fixmap   len:1 {
  K0  at:1   sz:2   0xa1 (161) Fixstr   "a"
  V0  at:3   sz:2   0xa1 (161) Fixstr   "b"
}

FAQs

Package last updated on 24 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts