/go-marsha

Multi-format marshalling/unmarshalling library for Go

Primary LanguageGoMIT LicenseMIT

go-marsha

Go Reference

Marsha provides a standard data marshaling and unmarshaling interface which can be implemented by different encodings and implementations such as CBOR and Protocol Buffers.

Current available implementations

A fast Marsha implementation for CBOR backed bygo-ipld-cbor package and github.com/daotl/cbor-gen package.

To use this implementation, marshaling/unmarshaling code generated by cbor-gen must exist.

Note that some types are not supported by cbor-gen yet such as float types,pointers to integers, some slice and map types, etc.

It additionally supports Cid type from github.com/ipfs/go-cid package.

A Marsha implementation for CBOR backed bygo-ipld-cbor and refmt packages.

Optionally, if marshaling/unmarshaling code generated by github.com/daotl/cbor-gen package is available, it will be used for performance improvement.

Note that some types are not supported by cbor-gen yet such as float types pointers to integers, some slice and map types, etc.

It additionally supports Cid type from github.com/ipfs/go-cid package.

A Marsha implementation for Protocol Buffers backed by *.pb.go files pre-generated by protoc. Only MarshalStruct and UnmarshalStruct are supported by this implementation because of the limitation of Protocol Buffers.

License

MIT © DAOT Labs.