{"id":21121429,"url":"https://github.com/oneofone/msgpack","last_synced_at":"2025-10-13T02:19:19.035Z","repository":{"id":62866322,"uuid":"559604510","full_name":"OneOfOne/msgpack","owner":"OneOfOne","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-07T17:29:50.000Z","size":700,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"v5","last_synced_at":"2025-01-21T05:25:04.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OneOfOne.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-30T16:22:25.000Z","updated_at":"2022-10-31T15:34:38.000Z","dependencies_parsed_at":"2022-11-08T06:32:03.311Z","dependency_job_id":null,"html_url":"https://github.com/OneOfOne/msgpack","commit_stats":null,"previous_names":[],"tags_count":129,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fmsgpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fmsgpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fmsgpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OneOfOne%2Fmsgpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OneOfOne","download_url":"https://codeload.github.com/OneOfOne/msgpack/tar.gz/refs/heads/v5","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243566274,"owners_count":20311851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T03:50:17.344Z","updated_at":"2025-10-13T02:19:13.990Z","avatar_url":"https://github.com/OneOfOne.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MessagePack encoding for Golang\n\n[![Build Status](https://travis-ci.org/oneofone/msgpack.svg)](https://travis-ci.org/oneofone/msgpack)\n[![PkgGoDev](https://pkg.go.dev/badge/go.oneofone.dev/msgpack/v5)](https://pkg.go.dev/go.oneofone.dev/msgpack/v5)\n[![Documentation](https://img.shields.io/badge/msgpack-documentation-informational)](https://msgpack.uptrace.dev/)\n[![Chat](https://discordapp.com/api/guilds/752070105847955518/widget.png)](https://discord.gg/rWtp5Aj)\n\n# This is a fork of [vmihailenco/msgpack](vmihailenco/msgpack/v5) that contains some optimizations and bug fixes\n\n\u003e :heart:\n\u003e [**Uptrace.dev** - All-in-one tool to optimize performance and monitor errors \u0026 logs](https://github.com/uptrace/uptrace)\n\n- [Documentation](https://msgpack.uptrace.dev)\n- [Reference](https://pkg.go.dev/go.oneofone.dev/msgpack/v5)\n- [Examples](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#pkg-examples)\n\nOther projects you may like:\n\n- [Bun](https://bun.uptrace.dev) - fast and simple SQL client for PostgreSQL, MySQL, and SQLite.\n- [BunRouter](https://bunrouter.uptrace.dev/) - fast and flexible HTTP router for Go.\n\n## Features\n\n- Primitives, arrays, maps, structs, time.Time and interface{}.\n- Appengine \\*datastore.Key and datastore.Cursor.\n- [CustomEncoder]/[CustomDecoder] interfaces for custom encoding.\n- [Extensions](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#example-RegisterExt) to encode\n  type information.\n- Renaming fields via `msgpack:\"my_field_name\"` and alias via `msgpack:\"alias:another_name\"`.\n- Omitting individual empty fields via `msgpack:\",omitempty\"` tag or all\n  [empty fields in a struct](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#example-Marshal-OmitEmpty).\n- [Map keys sorting](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#Encoder.SetSortMapKeys).\n- Encoding/decoding all\n  [structs as arrays](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#Encoder.UseArrayEncodedStructs)\n  or\n  [individual structs](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#example-Marshal-AsArray).\n- [Encoder.SetCustomStructTag] with [Decoder.SetCustomStructTag] can turn msgpack into drop-in\n  replacement for any tag.\n- Simple but very fast and efficient\n  [queries](https://pkg.go.dev/go.oneofone.dev/msgpack/v5#example-Decoder.Query).\n\n[customencoder]: https://pkg.go.dev/go.oneofone.dev/msgpack/v5#CustomEncoder\n[customdecoder]: https://pkg.go.dev/go.oneofone.dev/msgpack/v5#CustomDecoder\n[encoder.setcustomstructtag]:\n  https://pkg.go.dev/go.oneofone.dev/msgpack/v5#Encoder.SetCustomStructTag\n[decoder.setcustomstructtag]:\n  https://pkg.go.dev/go.oneofone.dev/msgpack/v5#Decoder.SetCustomStructTag\n\n## Installation\n\nmsgpack supports 2 last Go versions and requires support for\n[Go modules](https://github.com/golang/go/wiki/Modules). So make sure to initialize a Go module:\n\n```shell\ngo mod init github.com/my/repo\n```\n\nAnd then install msgpack/v5 (note _v5_ in the import; omitting it is a popular mistake):\n\n```shell\ngo get go.oneofone.dev/msgpack/v5\n```\n\n## Quickstart\n\n```go\nimport \"go.oneofone.dev/msgpack/v5\"\n\nfunc ExampleMarshal() {\n    type Item struct {\n        Foo string\n    }\n\n    b, err := msgpack.Marshal(\u0026Item{Foo: \"bar\"})\n    if err != nil {\n        panic(err)\n    }\n\n    var item Item\n    err = msgpack.Unmarshal(b, \u0026item)\n    if err != nil {\n        panic(err)\n    }\n    fmt.Println(item.Foo)\n    // Output: bar\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneofone%2Fmsgpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneofone%2Fmsgpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneofone%2Fmsgpack/lists"}