{"id":13693501,"url":"https://github.com/vmihailenco/msgpack","last_synced_at":"2025-05-12T15:33:05.436Z","repository":{"id":37664920,"uuid":"6417158","full_name":"vmihailenco/msgpack","owner":"vmihailenco","description":"msgpack.org[Go] MessagePack encoding for Golang","archived":false,"fork":false,"pushed_at":"2024-06-04T10:05:14.000Z","size":714,"stargazers_count":2478,"open_issues_count":42,"forks_count":240,"subscribers_count":36,"default_branch":"v5","last_synced_at":"2025-05-11T08:36:11.146Z","etag":null,"topics":["encoding","go","golang","msgpack","serialization"],"latest_commit_sha":null,"homepage":"https://msgpack.uptrace.dev/","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/vmihailenco.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":["https://uptrace.dev/sponsor"]}},"created_at":"2012-10-27T13:17:38.000Z","updated_at":"2025-05-10T09:34:52.000Z","dependencies_parsed_at":"2024-04-09T16:03:22.716Z","dependency_job_id":"9f8b5b41-92eb-4e4f-ba7d-193abf51ae8e","html_url":"https://github.com/vmihailenco/msgpack","commit_stats":{"total_commits":418,"total_committers":33,"mean_commits":"12.666666666666666","dds":"0.15071770334928225","last_synced_commit":"19c91dfdfa062658c39d9321be26163fc5833bd1"},"previous_names":[],"tags_count":132,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmihailenco%2Fmsgpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmihailenco%2Fmsgpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmihailenco%2Fmsgpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmihailenco%2Fmsgpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmihailenco","download_url":"https://codeload.github.com/vmihailenco/msgpack/tar.gz/refs/heads/v5","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766065,"owners_count":21960840,"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":["encoding","go","golang","msgpack","serialization"],"created_at":"2024-08-02T17:01:11.302Z","updated_at":"2025-05-12T15:33:05.405Z","avatar_url":"https://github.com/vmihailenco.png","language":"Go","readme":"# MessagePack encoding for Golang\n\n[![Build Status](https://travis-ci.org/vmihailenco/msgpack.svg)](https://travis-ci.org/vmihailenco/msgpack)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/vmihailenco/msgpack/v5)](https://pkg.go.dev/github.com/vmihailenco/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\u003e msgpack is brought to you by :star: [**uptrace/uptrace**](https://github.com/uptrace/uptrace).\n\u003e Uptrace is an [open source APM](https://uptrace.dev/get/open-source-apm.html) and blazingly fast\n\u003e [distributed tracing tool](https://get.uptrace.dev/compare/distributed-tracing-tools.html) powered\n\u003e by OpenTelemetry and ClickHouse. Give it a star as well!\n\n## Resources\n\n- [Documentation](https://msgpack.uptrace.dev)\n- [Chat](https://discord.gg/rWtp5Aj)\n- [Reference](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5)\n- [Examples](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#pkg-examples)\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/github.com/vmihailenco/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/github.com/vmihailenco/msgpack/v5#example-Marshal-OmitEmpty).\n- [Map keys sorting](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.SetSortMapKeys).\n- Encoding/decoding all\n  [structs as arrays](https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.UseArrayEncodedStructs)\n  or\n  [individual structs](https://pkg.go.dev/github.com/vmihailenco/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/github.com/vmihailenco/msgpack/v5#example-Decoder.Query).\n\n[customencoder]: https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#CustomEncoder\n[customdecoder]: https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#CustomDecoder\n[encoder.setcustomstructtag]:\n  https://pkg.go.dev/github.com/vmihailenco/msgpack/v5#Encoder.SetCustomStructTag\n[decoder.setcustomstructtag]:\n  https://pkg.go.dev/github.com/vmihailenco/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 github.com/vmihailenco/msgpack/v5\n```\n\n## Quickstart\n\n```go\nimport \"github.com/vmihailenco/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\n## See also\n\n- [Golang ORM](https://github.com/uptrace/bun) for PostgreSQL, MySQL, MSSQL, and SQLite\n- [Golang PostgreSQL](https://bun.uptrace.dev/postgres/)\n- [Golang HTTP router](https://github.com/uptrace/bunrouter)\n- [Golang ClickHouse ORM](https://github.com/uptrace/go-clickhouse)\n\n## Contributors\n\nThanks to all the people who already contributed!\n\n\u003ca href=\"https://github.com/vmihailenco/msgpack/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contributors-img.web.app/image?repo=vmihailenco/msgpack\" /\u003e\n\u003c/a\u003e\n","funding_links":["https://uptrace.dev/sponsor"],"categories":["开源类库","Misc","Open source library","Go","Repositories"],"sub_categories":["序列化","Serialization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmihailenco%2Fmsgpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmihailenco%2Fmsgpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmihailenco%2Fmsgpack/lists"}