Skip to content

msgpax extensions for tuple, naive datetime, etc.

License

Notifications You must be signed in to change notification settings

khattori/ex_msgpax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExMsgpax

ExMsgpax provides extensions for Msgpax to support tuple, naive datetime, etc.

Extention Types

ExMsgpax uses the Extention Types of MessagePack for data types which aare not supported by Msgpax.

Type Code Remarks
Atom 0 Atom types are converted to atom types, not strings.
NaiveDateTime 1
Date 2
Time 3
Tuple 4
Structs 5
Exceptions 6

Examples

iex> ExMsgpax.pack {1, 2, 3}
{:ok, <<214, 4, 147, 1, 2, 3>>}

iex> ExMsgpax.unpack <<214, 4, 147, 1, 2, 3>>
{:ok, {1, 2, 3}}

Installation

If available in Hex, the package can be installed by adding ex_msgpax to your list of dependencies in mix.exs:

def deps do
  [
    {:ex_msgpax, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_msgpax.

About

msgpax extensions for tuple, naive datetime, etc.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages