{"id":13465478,"url":"https://github.com/SomeRandomiOSDev/CBORCoding","last_synced_at":"2025-03-25T16:31:50.408Z","repository":{"id":45885512,"uuid":"190309079","full_name":"SomeRandomiOSDev/CBORCoding","owner":"SomeRandomiOSDev","description":"Easy CBOR encoding and decoding for iOS, macOS, tvOS and watchOS.","archived":false,"fork":false,"pushed_at":"2023-11-15T20:43:02.000Z","size":654,"stargazers_count":48,"open_issues_count":6,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-03T02:54:14.097Z","etag":null,"topics":["carthage","cbor","cocoapods","hacktoberfest","ios","macos","swift","swiftpm","tvos","watchos"],"latest_commit_sha":null,"homepage":"","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/SomeRandomiOSDev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-05T02:02:17.000Z","updated_at":"2024-08-28T13:28:05.000Z","dependencies_parsed_at":"2023-11-14T18:49:48.581Z","dependency_job_id":"46332fcd-7c99-4f8f-824a-b80c9fd1faef","html_url":"https://github.com/SomeRandomiOSDev/CBORCoding","commit_stats":{"total_commits":34,"total_committers":5,"mean_commits":6.8,"dds":"0.38235294117647056","last_synced_commit":"f2776a755182b2bcfe3403d8cf37018ebedb7f77"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2FCBORCoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2FCBORCoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2FCBORCoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SomeRandomiOSDev%2FCBORCoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SomeRandomiOSDev","download_url":"https://codeload.github.com/SomeRandomiOSDev/CBORCoding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222088560,"owners_count":16928977,"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":["carthage","cbor","cocoapods","hacktoberfest","ios","macos","swift","swiftpm","tvos","watchos"],"created_at":"2024-07-31T15:00:30.875Z","updated_at":"2024-10-29T17:31:00.156Z","avatar_url":"https://github.com/SomeRandomiOSDev.png","language":"Swift","funding_links":[],"categories":["Libs","Swift"],"sub_categories":["Data Management"],"readme":"# CBORCoding\n\n[![License MIT](https://img.shields.io/cocoapods/l/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)\n[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding) \n[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) \n[![Platform](https://img.shields.io/cocoapods/p/CBORCoding.svg)](https://cocoapods.org/pods/CBORCoding)\n[![Code Coverage](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding/branch/master/graph/badge.svg)](https://codecov.io/gh/SomeRandomiOSDev/CBORCoding)\n\n[![Carthage](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/carthage.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/carthage.yml)\n[![Cocoapods](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/cocoapods.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/cocoapods.yml)\n[![Documentation](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/documentation.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/documentation.yml)\n[![Swift Package](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/swift-package.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/swift-package.yml)\n[![SwiftLint](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/swiftlint.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/swiftlint.yml)\n[![XCFramework](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/xcframework.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/xcframework.yml)\n[![Xcode Project](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/xcodebuild.yml/badge.svg)](https://github.com/SomeRandomiOSDev/CBORCoding/actions/workflows/xcodebuild.yml)\n\n**CBORCoding** is a lightweight framework containing a coder pair for encoding and decoding `Codable` conforming types to and from [CBOR](https://cbor.io) document format for iOS, macOS, tvOS, and watchOS.\n\n## Installation\n\n**CBORCoding** is available through [CocoaPods](https://cocoapods.org), [Carthage](https://github.com/Carthage/Carthage) and the [Swift Package Manager](https://swift.org/package-manager/). \n\nTo install via CocoaPods, simply add the following line to your Podfile:\n\n```ruby\npod 'CBORCoding'\n```\n\nTo install via Carthage, simply add the following line to your Cartfile:\n\n```ruby\ngithub \"SomeRandomiOSDev/CBORCoding\"\n```\n\nTo install via the Swift Package Manager add the following line to your `Package.swift` file's `dependencies`:\n\n```swift\n.package(url: \"https://github.com/SomeRandomiOSDev/CBORCoding.git\", from: \"1.0.0\")\n```\n\n## Usage\n\nFirst import **CBORCoding** at the top of your Swift file:\n\n```swift\nimport CBORCoding\n```\n\nAfter importing, the use is nearly identical to that of the `JSONEncoder`/`JSONDecoder` class pair provided by the Swift Foundation library. This example shows how to encode an instance of a simple `Car` type to a CBOR object: \n\n```swift\nstruct Car: Codable {\n    var manufacturer: String\n    var model: String\n    var horsePower: Int\n    var description: String?\n}\n\nlet stinger = Car(manufacturer: \"Kia\", model: \"Stinger GT2\", horsePower: 365, description: nil)  \nlet encoder = CBOREncoder()\n\nlet encodedData = try encoder.encode(stinger)\nprint(\"CBOR: \\(hexString(encodedData))\")\n\n/* Prints:\n CBOR: 0xA36C6D616E756661637475726572634B6961656D6F64656C6B5374696E676572204754326A686F727365506F77657219016D\n*/\n```\n\nThis example shows how to decode that encoded `Car` value at a later time: \n\n```swift\nlet decoder = CBORDecoder()\nlet stinger = try decoder.decode(Car.self, from: encodedData)\n```\n\n## CBOR\n\n**Concise Binary Object Representation** is a data format for being able to encode formatted data with a goal of a having as small a message size as possible.\n\nWhile this framework implements as much of the specification as possible, there are a few notable exceptions:\n\n* CBOR supports keys of any defined type, however, since `Codable` relies on `CodingKey` for encoding/decoding its keyed containers, this framework is limited in its supported key types to `Int` and `String`.\n* CBOR supports DecimalFractions and Bigfloats whose mantissa is a Bignum. With the current implementation, this is limited to Bignums whose content fits into either a `Int64` or `UInt64` type.\n\nFor more information about the CBOR format see: [CBOR](https://cbor.io) \u0026 [RFC 8949](https://datatracker.ietf.org/doc/html/rfc8949).\n\n## Contributing\n\nWhether it's submitting a feature request, reporting a bug, or writing code yourself, all contributions to this library are welcome! Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for more information on how you can contribute.\n\n## Author\n\nJoe Newton, somerandomiosdev@gmail.com\n\n## Credits\n\n**CBORCoding** is based heavily on the `JSONEncoder`/`JSONDecoder` classes provided by Swift. See `ATTRIBUTIONS` for more details.\n\n## License\n\n**CBORCoding** is available under the MIT license. See the `LICENSE` file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSomeRandomiOSDev%2FCBORCoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSomeRandomiOSDev%2FCBORCoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSomeRandomiOSDev%2FCBORCoding/lists"}