marshal
Version, currently master branch1 version
- master branchlatestMar 12, 2020
github.com/sam0x17/marshal
Allows deep copying, storing, and loading of crystal objects, even across different executions.
Installation
# Add this to your shard.yml
dependencies:
marshal:
github: sam0x17/marshal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
0.31.1- License
- MIT
- Author
- Sam Johnson
Dependencies
This version declares no dependencies.
README
marshal
The purpose of this shard is to provide easy-to-use marshaling of crystal objects
without any work needed on the part of the programmer. There are no modules to
include, simply require "marshal" and you can use obj.marshal_pack on any
object to pack it into bytes and Klass.marshal_unpack(bytes) to unpack any
object that was packed using the library.
Marshal goes to great lengths to try to work out of the box for most types,
but some types will cause it to fail. It is recommended that you write
specs similar to those in the marshal_spec.cr file for whatever types
you plan to use before using this.
The shard is under development though the core API will never change. This is not production stable but with a few specs you can have confidence it will work in your particular scenario.
This is basically messagepack for the lazy.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Mar 12, 2020
- Crystal
0.31.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/sam0x17/marshal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1