{"id":1676,"url":"https://github.com/apple/swift-protobuf","last_synced_at":"2026-04-20T16:06:04.598Z","repository":{"id":37742806,"uuid":"67177488","full_name":"apple/swift-protobuf","owner":"apple","description":"Plugin and runtime library for using protobuf with Swift","archived":false,"fork":false,"pushed_at":"2026-04-17T20:56:20.000Z","size":49134,"stargazers_count":4912,"open_issues_count":66,"forks_count":521,"subscribers_count":101,"default_branch":"main","last_synced_at":"2026-04-18T00:00:27.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-09-02T00:51:55.000Z","updated_at":"2026-04-17T20:56:25.000Z","dependencies_parsed_at":"2025-04-08T16:44:03.524Z","dependency_job_id":null,"html_url":"https://github.com/apple/swift-protobuf","commit_stats":{"total_commits":2211,"total_committers":83,"mean_commits":26.63855421686747,"dds":"0.41655359565807326","last_synced_commit":"43bc712f0152fcca7f8b950d9409bcd8fc20a40e"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"purl":"pkg:github/apple/swift-protobuf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-protobuf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-protobuf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-protobuf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-protobuf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apple","download_url":"https://codeload.github.com/apple/swift-protobuf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apple%2Fswift-protobuf/sbom","scorecard":{"id":203721,"data":{"date":"2025-08-11","repo":{"name":"github.com/apple/swift-protobuf","commit":"5c021bca3f103ebe410ca71936139417a8d78a55"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":6.3,"checks":[{"name":"Code-Review","score":8,"reason":"Found 26/30 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 15 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/check_upstream_protos.yml:1","Warn: no topLevel permission defined: .github/workflows/pull_request_label.yml:1","Warn: no topLevel permission defined: .github/workflows/regular_conformance.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:146: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:172: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:201: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_upstream_protos.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/check_upstream_protos.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check_upstream_protos.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/check_upstream_protos.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull_request_label.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/pull_request_label.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull_request_label.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/pull_request_label.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/regular_conformance.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/regular_conformance.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/regular_conformance.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/regular_conformance.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/regular_conformance.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/apple/swift-protobuf/regular_conformance.yml/main?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found","Info: SwiftLibFuzzer integration found: FuzzTesting/Sources/FuzzAsyncMessageSequence/main.swift:22","Info: SwiftLibFuzzer integration found: FuzzTesting/Sources/FuzzBinary/main.swift:12","Info: SwiftLibFuzzer integration found: FuzzTesting/Sources/FuzzBinaryDelimited/main.swift:13","Info: SwiftLibFuzzer integration found: FuzzTesting/Sources/FuzzJSON/main.swift:13","Info: SwiftLibFuzzer integration found: FuzzTesting/Sources/FuzzTextFormat/main.swift:13"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T23:16:17.917Z","repository_id":37742806,"created_at":"2025-08-16T23:16:17.917Z","updated_at":"2025-08-16T23:16:17.917Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32054622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-01-05T20:15:53.058Z","updated_at":"2026-04-20T16:06:04.590Z","avatar_url":"https://github.com/apple.png","language":"Swift","funding_links":[],"categories":["Representations","Libs","Swift","Network","Networking","HarmonyOS","Utility [🔝](#readme)","Major"],"sub_categories":["Email","Utility","Other free courses","Windows Manager","Network"],"readme":"\u003cimg src=\"https://swift.org/assets/images/swift.svg\" alt=\"Swift logo\" height=\"70\" \u003e\n\n# Swift Protobuf\n\n**Welcome to Swift Protobuf!**\n\n[Apple's Swift programming language](https://swift.org/) is a perfect\ncomplement to [Google's Protocol Buffer](https://protobuf.dev/)\n(\"protobuf\") serialization technology.\nThey both emphasize high performance and programmer safety.\n\nThis project provides both the command-line program that adds Swift\ncode generation to Google's `protoc` and the runtime library that is\nnecessary for using the generated code.\nAfter using the protoc plugin to generate Swift code from your .proto\nfiles, you will need to add this library to your project.\n\n[![Build and Test](https://github.com/apple/swift-protobuf/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/apple/swift-protobuf/actions/workflows/build.yml)\n[![Check Upstream Protos](https://github.com/apple/swift-protobuf/actions/workflows/check_upstream_protos.yml/badge.svg?branch=main)](https://github.com/apple/swift-protobuf/actions/workflows/check_upstream_protos.yml)\n[![Run Protobuf Head Conformance Tests](https://github.com/apple/swift-protobuf/actions/workflows/head_conformance.yml/badge.svg?branch=main)](https://github.com/apple/swift-protobuf/actions/workflows/head_conformance.yml)\n\n# Features of SwiftProtobuf\n\nSwiftProtobuf offers many advantages over alternative serialization\nsystems:\n\n* Safety: The protobuf code-generation system avoids the\n  errors that are common with hand-built serialization code.\n* Correctness: SwiftProtobuf passes both its own extensive\n  test suite and Google's full conformance test for protobuf\n  correctness.\n* Schema-driven: Defining your data structures in a separate\n  `.proto` schema file clearly documents your communications\n  conventions.\n* Idiomatic: SwiftProtobuf takes full advantage of the Swift language.\n  In particular, all generated types provide full Swift copy-on-write\n  value semantics.\n* Efficient binary serialization: The `.serializedBytes()`\n  method returns a bag of bytes with a compact binary form of your data.\n  You can deserialize the data using the `init(contiguousBytes:)`\n  initializer.\n* Standard JSON serialization: The `.jsonUTF8Bytes()` method returns a JSON\n  form of your data that can be parsed with the `init(jsonUTF8Bytes:)`\n  initializer.\n* Hashable, Equatable: The generated struct can be put into a\n  `Set\u003c\u003e` or `Dictionary\u003c\u003e`.\n* Performant: The binary and JSON serializers have been\n  extensively optimized.\n* Extensible: You can add your own Swift extensions to any\n  of the generated types.\n\nBest of all, you can take the same `.proto` file and generate\nJava, C++, Python, or Objective-C for use on other platforms. The\ngenerated code for those languages will use the exact same\nserialization and deserialization conventions as SwiftProtobuf, making\nit easy to exchange serialized data in binary or JSON forms, with no\nadditional effort on your part.\n\n# Documentation\n\nMore information is available in the associated documentation:\n\n * [Google's protobuf documentation](https://protobuf.dev/)\n   provides general information about protocol buffers, the protoc compiler,\n   and how to use protocol buffers with C++, Java, and other languages.\n * [PLUGIN.md](Documentation/PLUGIN.md) documents the `protoc-gen-swift`\n   plugin that adds Swift support to the `protoc` program\n * [API.md](Documentation/API.md) documents how to use the generated code.\n   This is recommended reading for anyone using SwiftProtobuf in their\n   project.\n * [INTERNALS.md](Documentation/INTERNALS.md) documents the internal structure\n   of the generated code and the library.  This\n   should only be needed by folks interested in working on SwiftProtobuf\n   itself.\n * [STYLE_GUIDELINES.md](Documentation/STYLE_GUIDELINES.md) documents the style\n   guidelines we have adopted in our codebase if you are interested in\n   contributing\n\n# Getting Started\n\nIf you've worked with Protocol Buffers before, adding Swift support is very\nsimple: you just need to build the `protoc-gen-swift` program and copy it into\nyour PATH.\nThe `protoc` program will find and use it automatically, allowing you\nto build Swift sources for your proto files.\nYou will also, of course, need to add the SwiftProtobuf runtime library to\nyour project as explained below.\n\n## System Requirements\n\nTo use Swift with Protocol buffers, you'll need:\n\n* A Swift 6.0 or later compiler (or, if building with Xcode, Xcode 16.0 or later\n  as required by the App Store). The Swift protobuf project is being developed\n  and tested against the latest release version of Swift available from\n  [Swift.org](https://swift.org)\n\n* Google's protoc compiler.  The Swift protoc plugin is being actively developed\n  and tested against the latest protobuf sources. The SwiftProtobuf tests need a\n  version of protoc which supports the `swift_prefix` option (introduced in\n  protoc 3.2.0). It may work with earlier versions of protoc. You can get recent\n  versions from\n  [Google's github repository](https://github.com/protocolbuffers/protobuf).\n\n## Building and Installing the Code Generator Plugin\n\nTo translate `.proto` files into Swift, you will need both Google's\nprotoc compiler and the SwiftProtobuf code generator plugin.\n\nBuilding the plugin should be simple on any supported Swift platform:\n\n```bash\ngit clone https://github.com/apple/swift-protobuf.git\ncd swift-protobuf\n```\n\nPick what released version of SwiftProtobuf you are going to use.  You can get\na list of tags with:\n\n```bash\ngit tag -l\n```\n\nOnce you pick the version you will use, set your local state to match, and\nbuild the protoc plugin:\n\n```bash\ngit checkout tags/[tag_name]\nswift build -c release\n```\n\nThis will create a binary called `protoc-gen-swift` in the `.build/release`\ndirectory.\n\nTo install, just copy this one executable into a directory that is\npart of your `PATH` environment variable.\n\nNOTE: The Swift runtime support is now included with macOS. If you are\nusing old Xcode versions or are on older system versions, you might need\nto use also use `--static-swift-stdlib` with `swift build`.\n\n### Alternatively install via Homebrew\n\nIf you prefer using [Homebrew](https://brew.sh):\n\n```bash\nbrew install swift-protobuf\n```\n\nThis will install `protoc` compiler and Swift code generator plugin.\n\n## Converting .proto files into Swift\n\nTo generate Swift output for your .proto files, you run the `protoc` command as\nusual, using the `--swift_out=\u003cdirectory\u003e` option:\n\n```bash\nprotoc --swift_out=. my.proto\n```\n\nThe `protoc` program will automatically look for `protoc-gen-swift` in your\n`PATH` and use it.\n\nEach `.proto` input file will get translated to a corresponding `.pb.swift`\nfile in the output directory.\n\nMore information about building and using `protoc-gen-swift` can be found\nin the [detailed Plugin documentation](Documentation/PLUGIN.md).\n\n## Adding the SwiftProtobuf library to your project...\n\nTo use the generated code, you need to include the `SwiftProtobuf` library\nmodule in your project.  How you do this will vary depending on how\nyou're building your project.  Note that in all cases, we strongly recommend\nthat you use the version of the SwiftProtobuf library that corresponds to\nthe version of `protoc-gen-swift` you used to generate the code.\n\n### ...using `swift build`\n\nAfter copying the `.pb.swift` files into your project, you will need to add the\n[SwiftProtobuf library](https://github.com/apple/swift-protobuf) to your\nproject to support the generated code.\nIf you are using the Swift Package Manager, add a dependency to your\n`Package.swift` file and import the `SwiftProtobuf` library into the desired\ntargets.  Adjust the `\"1.27.0\"` here to match the `[tag_name]` you used to build\nthe plugin above:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/apple/swift-protobuf.git\", from: \"1.27.0\"),\n],\ntargets: [\n    .target(\n      name: \"MyTarget\",\n      dependencies: [.product(name: \"SwiftProtobuf\", package: \"swift-protobuf\")]\n    ),\n]\n```\n\n### ...using Xcode\n\nIf you are using Xcode, then you should:\n\n* Add the `.pb.swift` source files generated from your protos directly to your\n  project\n* Add this SwiftPM package as dependency of your xcode project:\n  [Apple Docs](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)\n\n### ...using CocoaPods\n\nIf you're using CocoaPods, add this to your `Podfile` adjusting the `:tag` to\nmatch the `[tag_name]` you used to build the plugin above:\n\n```ruby\npod 'SwiftProtobuf', '~\u003e 1.0'\n```\n\nAnd run `pod install`.\n\nNOTE: CocoaPods 1.7 or newer is required.\n\n# Quick Start\n\nOnce you have installed the code generator, used it to\ngenerate Swift code from your `.proto` file, and\nadded the SwiftProtobuf library to your project, you can\njust use the generated types as you would any other Swift\nstruct.\n\nFor example, you might start with the following very simple\nproto file:\n```protobuf\nsyntax = \"proto3\";\n\nmessage BookInfo {\n   int64 id = 1;\n   string title = 2;\n   string author = 3;\n}\n```\n\nThen generate Swift code using:\n```bash\nprotoc --swift_out=. DataModel.proto\n```\n\nThe generated code will expose a Swift property for\neach of the proto fields as well as a selection\nof serialization and deserialization capabilities:\n```swift\n// Create a BookInfo object and populate it:\nvar info = BookInfo()\ninfo.id = 1734\ninfo.title = \"Really Interesting Book\"\ninfo.author = \"Jane Smith\"\n\n// As above, but generating a read-only value:\nlet info2 = BookInfo.with {\n    $0.id = 1735\n    $0.title = \"Even More Interesting\"\n    $0.author = \"Jane Q. Smith\"\n  }\n\n// Serialize to binary protobuf format: you can choose to serialize into\n// any type conforming to `SwiftProtobufContiguousBytes`. For example:\n// Resolve the `SwiftProtobufContiguousBytes` return value to `Data`\nlet binaryData: Data = try info.serializedBytes()\n// Resolve the `SwiftProtobufContiguousBytes` return value to `[UInt8]`\nlet binaryDataAsBytes: [UInt8] = try info.serializedBytes()\n\n// Note that while the `serializedBytes()` spelling is generally preferred,\n// you may also use `serializedData()` to get the bytes as an instance of\n// `Data` where required.\n// This means that the following two statements are equivalent:\n// let binaryData: Data = try info.serializedBytes()\n// let binaryData: Data = try info.serializedData()\n\n// Deserialize a received Data object from `binaryData`\nlet decodedInfo = try BookInfo(serializedData: binaryData)\n\n// Deserialize a received [UInt8] object from `binaryDataAsBytes`\nlet decodedInfo = try BookInfo(serializedBytes: binaryDataAsBytes)\n\n// Serialize to JSON format as a Data object, or as any other type conforming to\n// SwiftProtobufContiguousBytes. For example:\nlet jsonData: Data = try info.jsonUTF8Data()\nlet jsonBytes: [UInt8] = try info.jsonUTF8Bytes()\n\n// Deserialize from JSON format from `jsonBytes`\nlet receivedFromJSON = try BookInfo(jsonUTF8Bytes: jsonBytes)\n```\n\nYou can find more information in the detailed\n[API Documentation](Documentation/API.md).\n\n## Report any issues\n\nIf you run into problems, please send us a detailed report.\nAt a minimum, please include:\n\n* The specific operating system and version (for example, \"macOS 10.12.1\" or\n  \"Ubuntu 16.10\")\n* The version of Swift you have installed (from `swift --version`)\n* The version of the protoc compiler you are working with from\n  `protoc --version`\n* The specific version of this source code (you can use `git log -1` to get the\n  latest commit ID)\n* Any local changes you may have\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fswift-protobuf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapple%2Fswift-protobuf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapple%2Fswift-protobuf/lists"}