vmihailenco / Msgpack
Licence: bsd-2-clause
msgpack.org[Go] MessagePack encoding for Golang
Stars: ✭ 1,353
Projects that are alternatives of or similar to Msgpack
Watson
WATSON: Wasted but Amazing Turing-incomplete Stack-based Object Notation
Stars: ✭ 258 (-80.93%)
Mutual labels: encoding, serialization
Airframe
Essential Building Blocks for Scala
Stars: ✭ 442 (-67.33%)
Mutual labels: msgpack, serialization
Messagepack Csharp
Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Stars: ✭ 3,668 (+171.1%)
Mutual labels: msgpack, serialization
sirdez
Glorious Binary Serialization and Deserialization for TypeScript.
Stars: ✭ 20 (-98.52%)
Mutual labels: encoding, serialization
Msgpack Scala
MessagePack serializer implementation for Scala / msgpack.org[Scala]
Stars: ✭ 87 (-93.57%)
Mutual labels: msgpack, serialization
sia
Sia - Binary serialisation and deserialisation
Stars: ✭ 52 (-96.16%)
Mutual labels: encoding, serialization
Ceras
Universal binary serializer for a wide variety of scenarios https://discord.gg/FGaCX4c
Stars: ✭ 374 (-72.36%)
Mutual labels: msgpack, serialization
Pbf
A low-level, lightweight protocol buffers implementation in JavaScript.
Stars: ✭ 618 (-54.32%)
Mutual labels: encoding, serialization
Msgpack Rust
MessagePack implementation for Rust / msgpack.org[Rust]
Stars: ✭ 561 (-58.54%)
Mutual labels: msgpack, serialization
Binary
Generic and fast binary serializer for Go
Stars: ✭ 86 (-93.64%)
Mutual labels: encoding, serialization
Bincode
A binary encoder / decoder implementation in Rust.
Stars: ✭ 1,100 (-18.7%)
Mutual labels: encoding, serialization
msgpack-perl
MessagePack serializer implementation for Perl / msgpack.org[Perl]
Stars: ✭ 48 (-96.45%)
Mutual labels: serialization, msgpack
sbp
Structured Bindings Pack - serialize C++ structs into MessagePack binary form
Stars: ✭ 16 (-98.82%)
Mutual labels: serialization, msgpack
msgpack-smalltalk
MessagePack serialization library for various Smalltalk dialects / msgpack.org[Smalltalk]
Stars: ✭ 22 (-98.37%)
Mutual labels: serialization, msgpack
Msgpack.php
A pure PHP implementation of the MessagePack serialization format / msgpack.org[PHP]
Stars: ✭ 327 (-75.83%)
Mutual labels: msgpack, serialization
Mashumaro
Fast and well tested serialization framework on top of dataclasses
Stars: ✭ 208 (-84.63%)
Mutual labels: msgpack, serialization
Jsonlab
JSONLab: a native JSON/UBJSON/MassagePack encoder/decoder for MATLAB/Octave
Stars: ✭ 202 (-85.07%)
Mutual labels: encoding, serialization
Cpp Serializers
Benchmark comparing various data serialization libraries (thrift, protobuf etc.) for C++
Stars: ✭ 533 (-60.61%)
Mutual labels: msgpack, serialization
Msgpack Cli
MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]
Stars: ✭ 761 (-43.75%)
Mutual labels: msgpack, serialization
MessagePack encoding for Golang
❤️ Uptrace.dev - All-in-one tool to optimize performance and monitor errors & logs
- Join Discord to ask questions.
- Documentation
- Reference
- Examples
Features
- Primitives, arrays, maps, structs, time.Time and interface{}.
- Appengine *datastore.Key and datastore.Cursor.
- CustomEncoder/CustomDecoder interfaces for custom encoding.
- Extensions to encode type information.
- Renaming fields via
msgpack:"my_field_name"
and alias viamsgpack:"alias:another_name"
. - Omitting individual empty fields via
msgpack:",omitempty"
tag or all empty fields in a struct. - Map keys sorting.
- Encoding/decoding all structs as arrays or individual structs.
- Encoder.SetCustomStructTag with Decoder.SetCustomStructTag can turn msgpack into drop-in replacement for any tag.
- Simple but very fast and efficient queries.
Installation
msgpack supports 2 last Go versions and requires support for Go modules. So make sure to initialize a Go module:
go mod init github.com/my/repo
And then install msgpack/v5 (note v5 in the import; omitting it is a popular mistake):
go get github.com/vmihailenco/msgpack/v5
Quickstart
import "github.com/vmihailenco/msgpack/v5"
func ExampleMarshal() {
type Item struct {
Foo string
}
b, err := msgpack.Marshal(&Item{Foo: "bar"})
if err != nil {
panic(err)
}
var item Item
err = msgpack.Unmarshal(b, &item)
if err != nil {
panic(err)
}
fmt.Println(item.Foo)
// Output: bar
}
See also
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].