{"id":21770301,"url":"https://github.com/flight-school/messagepack","last_synced_at":"2025-02-26T02:20:58.283Z","repository":{"id":31893665,"uuid":"130728452","full_name":"Flight-School/MessagePack","owner":"Flight-School","description":"A MessagePack encoder and decoder for Codable types","archived":false,"fork":false,"pushed_at":"2023-01-06T14:25:47.000Z","size":145,"stargazers_count":194,"open_issues_count":6,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T12:21:49.667Z","etag":null,"topics":["codable","messagepack","swift"],"latest_commit_sha":null,"homepage":"https://flight.school/books/codable","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Flight-School.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["mattt"],"custom":"https://flight.school/books/codable"}},"created_at":"2018-04-23T16:52:55.000Z","updated_at":"2024-04-14T12:21:49.668Z","dependencies_parsed_at":"2022-08-07T17:00:49.821Z","dependency_job_id":null,"html_url":"https://github.com/Flight-School/MessagePack","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2FMessagePack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2FMessagePack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2FMessagePack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Flight-School%2FMessagePack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Flight-School","download_url":"https://codeload.github.com/Flight-School/MessagePack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240778214,"owners_count":19855969,"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":["codable","messagepack","swift"],"created_at":"2024-11-26T14:12:07.506Z","updated_at":"2025-02-26T02:20:58.252Z","avatar_url":"https://github.com/Flight-School.png","language":"Swift","readme":"# MessagePack\n\n[![Build Status][build status badge]][build status]\n\nA [MessagePack](https://msgpack.org/) encoder and decoder for `Codable` types.\n\nThis functionality is discussed in Chapter 7 of\n[Flight School Guide to Swift Codable](https://flight.school/books/codable).\n\n## Requirements\n\n- Swift 4.2+\n\n## Usage\n\n### Encoding Messages\n\n```swift\nimport MessagePack\n\nlet encoder = MessagePackEncoder()\nlet value = try! encoder.encode([\"a\": 1, \"b\": 2, \"c\": 3])\n// [0x83, 0xA1, 0x62, 0x02, 0xA1, 0x61, 0x01, 0xA1, 0x63, 0x03]\n```\n\n### Decoding Messages\n\n```swift\nimport MessagePack\n\nlet decoder = MessagePackDecoder()\nlet data = Data(bytes: [0xCB, 0x40, 0x09, 0x21, 0xF9, 0xF0, 0x1B, 0x86, 0x6E])\nlet value = try! decoder.decode(Double.self, from: data)\n// 3.14159\n```\n\n## Installation\n\n### Swift Package Manager\n\nAdd the MessagePack package to your target dependencies in `Package.swift`:\n\n```swift\nimport PackageDescription\n\nlet package = Package(\n  name: \"YourProject\",\n  dependencies: [\n    .package(\n        url: \"https://github.com/Flight-School/MessagePack\",\n        from: \"1.2.3\"\n    ),\n  ]\n)\n```\n\nThen run the `swift build` command to build your project.\n\n### CocoaPods\n\nYou can install `MessagePack` via CocoaPods,\nby adding the following line to your `Podfile`:\n\n```ruby\npod 'MessagePack-FlightSchool', '~\u003e 1.2.4'\n```\n\nRun the `pod install` command to download the library\nand integrate it into your Xcode project.\n\n\u003e **Note**\n\u003e The module name for this library is \"MessagePack\" ---\n\u003e that is, to use it, you add `import MessagePack` to the top of your Swift code\n\u003e just as you would by any other installation method.\n\u003e The pod is called \"MessagePack-FlightSchool\"\n\u003e because there's an existing pod with the name \"MessagePack\".\n\n## License\n\nMIT\n\n## Contact\n\nMattt ([@mattt](https://twitter.com/mattt))\n\n[build status]: https://github.com/Flight-School/MessagePack/actions?query=workflow%3ACI\n[build status badge]: https://github.com/Flight-School/MessagePack/workflows/CI/badge.svg\n","funding_links":["https://github.com/sponsors/mattt","https://flight.school/books/codable"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflight-school%2Fmessagepack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflight-school%2Fmessagepack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflight-school%2Fmessagepack/lists"}