Public beta — not for production use. Data may be wiped at any time. Questions? Contact us.
A
Axiom
/Marketplace/christiangeorgelucas/msgpack-tools
Sign in

christiangeorgelucas/msgpack-tools

v0.1.0java

The msgpack-tools package provides a set of composable nodes for encoding and decoding MessagePack data in Java, facilitating the conversion to and from Extended-JSON. It includes features for structural type-tree inspection, validation of MessagePack well-formedness, and handling of various extension types, making it ideal for applications that require efficient serialization and deserialization of complex data structures.

Published by Christian George Lucas· MIT

messagepackserializationjsondata-validationstreamingjava

Use cases

  • Encode JSON data into compact MessagePack format
  • Decode MessagePack streams for processing in Java applications
  • Validate MessagePack data integrity before processing
  • Inspect the structure of MessagePack values for debugging
  • Handle timestamp extensions in serialized data

Nodes (8)

DecodeMsgpackunary
DecodeMsgpackRequest·MsgpackDoc

The DecodeMsgpack node converts raw MessagePack byte sequences into Extended-JSON format, enabling easy interpretation of binary data. It handles various data types and ensures that errors in the input do not cause crashes, but instead return structured error messages.

DecodeMsgpackStreamunary
DecodeMsgpackStreamRequest·DecodeMsgpackStreamResponse

The DecodeMsgpackStream node processes a byte buffer containing concatenated MessagePack values and decodes them into a list of Extended-JSON strings, ensuring robust error handling for malformed or truncated data.

DecodeTimestampunary
DecodeTimestampRequest·DecodeTimestampResponse

The DecodeTimestamp node decodes a MessagePack-encoded timestamp-extension value into its constituent parts: unix_seconds, nanos, and an RFC 3339 UTC representation. It also handles errors for malformed timestamp extensions, ensuring robust processing of input data.

EncodeMsgpackunary
EncodeMsgpackRequest·MsgpackDoc

The EncodeMsgpack node encodes Extended-JSON or plain JSON text into raw MessagePack bytes, providing a compact binary representation of the input data. It also returns a canonical Extended-JSON echo and handles special value types while ensuring robust error handling for malformed inputs.

EncodeTimestampunary
EncodeTimestampRequest·EncodeTimestampResponse

The EncodeTimestamp node generates a MessagePack timestamp-extension encoding based on a provided unix timestamp in seconds and nanoseconds, ensuring the output is in the most compact and correct format. It handles both positive and negative timestamps and validates the nanoseconds input for correctness.

ExtensionsInfounary
ExtensionsInfoRequest·ExtensionsInfoResponse

The ExtensionsInfo node recursively extracts all extension-type values from a MessagePack value, detailing their paths, types, payload lengths, and hex representations, while also decoding timestamps into RFC 3339 format.

InspectMsgpackunary
InspectMsgpackRequest·InspectMsgpackResponse

The InspectMsgpack node analyzes a MessagePack value and generates a detailed structural type tree that represents its on-wire format. It provides a recursive breakdown of each element's type, size, and specific characteristics without merging distinct wire types.

ValidateMsgpackunary
ValidateMsgpackRequest·ValidateMsgpackResponse

The ValidateMsgpack node checks if the provided raw bytes represent a valid MessagePack value without converting it to JSON. It returns the byte length of the valid MessagePack value or the offset of the first error if the structure is invalid.

Messages (18)

Download .proto
DecodeMsgpackRequest
data:bytes
DecodeMsgpackStreamRequest
data:bytes
DecodeMsgpackStreamResponse
documents_json:[]string
count:int32
error:string
DecodeTimestampRequest
data:bytes
DecodeTimestampResponse
unix_seconds:int64

The number of seconds since the Unix epoch (January 1, 1970).

nanos:int32

The number of nanoseconds that extend the unix_seconds value for higher precision.

iso8601:string
encoding:string
error:string
EncodeMsgpackRequest
json:string
EncodeTimestampRequest
unix_seconds:int64

The number of seconds since the Unix epoch (January 1, 1970), which can be negative for timestamps before this date.

nanos:int32

The number of nanoseconds to add to the unix_seconds, which must be in the range of 0 to 999999999.

EncodeTimestampResponse
data:bytes
encoding:string
error:string
ExtensionOccurrence
path:string
ext_type:int32
length:int32
data_hex:string
is_timestamp:bool
timestamp_iso:string
ExtensionsInfoRequest
data:bytes
ExtensionsInfoResponse
extensions:[]ExtensionOccurrence
count:int32
error:string
InspectMsgpackRequest
data:bytes
InspectMsgpackResponse
root:MsgpackNode
error:string
MsgpackDoc
data:bytes
json:string
error:string
MsgpackMapEntry
key:MsgpackNode
value:MsgpackNode
MsgpackNode
msgpack_type:string
size:int32
ext_type:int32
preview:string
elements:[]MsgpackNode
entries:[]MsgpackMapEntry
ValidateMsgpackRequest
data:bytes
ValidateMsgpackResponse
valid:bool
error:string
error_offset:int64
byte_length:int64

Use as a tool in any AI agent

christiangeorgelucas/msgpack-tools is callable as a tool from any MCP client (Claude, Cursor, or your own agent) via Axiom's hosted MCP server — no install, no download. Add the server, then your agent can search and invoke it, or pin it as a typed tool.

claude mcp add --transport http axiom https://api.axiomide.com/mcp --header "Authorization: Bearer YOUR_AXIOM_API_KEY"

Replace YOUR_AXIOM_API_KEY with a key you create in Console → API Keys.

MCP server setup & other clients →

Use this package

Sign in to import christiangeorgelucas/msgpack-tools into the graph editor — drop it into a flow and hit run. Or call it directly via the API Reference with your API key.

Sign in to useOpen editor

Stats

Error rate (1h)0.0%
Back to marketplace