Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.
/ nu_plugin_msgpack Public archive

Nushell plugin for converting to and from msgpack.

License

Notifications You must be signed in to change notification settings

hulthe/nu_plugin_msgpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nu_plugin_msgpack

A plugin for nushell that provides the commands from msgpack and to msgpack to convert between Nu types and MsgPack, which is a JSON-like binary serialization format.

ls-to-msgpack.gif

Installation

# download and install the plugin
cargo install --git https://github.com/hulthe/nu_plugin_msgpack.git

# register the plugin with nu, you should put this in your `config.nu`
register ~/.cargo/bin/nu_plugin_msgpack

Quirks

There's not a 1 to 1 mapping between Nu-types and MsgPack-types. Here are some conversions that to msgpack does which might trip you up:

  • filesize becomes an integer of bytes. This is consistent with to json.
  • duration becomes an integer of nanoseconds. This is consistent with to json.
  • range becomes an array. This is consistent with to json.
  • The following Nu types become nil: block, closure, error, cell_path, and match_pattern.

Additionally Nu dates are converted to the MsgPack timestamp extension type. This differs from to json which converts dates to strings.

About

Nushell plugin for converting to and from msgpack.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages