https://github.com/dashevo/tinycborobjc
Objective-C wrapper for TinyCbor - Concise Binary Object Representation (CBOR) Library
https://github.com/dashevo/tinycborobjc
cbor mobile objective-c
Last synced: 6 months ago
JSON representation
Objective-C wrapper for TinyCbor - Concise Binary Object Representation (CBOR) Library
- Host: GitHub
- URL: https://github.com/dashevo/tinycborobjc
- Owner: dashevo
- License: mit
- Created: 2018-08-28T09:45:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-04T14:05:13.000Z (over 2 years ago)
- Last Synced: 2025-04-05T05:02:43.741Z (6 months ago)
- Topics: cbor, mobile, objective-c
- Language: Objective-C
- Size: 204 KB
- Stars: 8
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TinyCborObjc

[](https://cocoapods.org/pods/TinyCborObjc)
[](https://cocoapods.org/pods/TinyCborObjc)
[](https://cocoapods.org/pods/TinyCborObjc)TinyCborObjc allows encoding and decoding Foundation-objects into/from CBOR representation.
Supported types:
- `NSDictionary`
- `NSArray`
- `NSString`
- `NSNumber`
- `NSNull`
- `NSData`## Usage
Encoding
``` objective-c
#importNSDictionary *dictionary = ...;
NSData *cborData = [dictionary ds_cborEncodedObject];
```Decoding
``` objective-c
#importNSData *data = ...; // CBOR data
NSError *error = nil;
id decoded = [data ds_decodeCborError:&error];
```## Dependencies
Build on top of [tinycbor](https://github.com/intel/tinycbor) library (integrated as pod dependency).
## Installation
TinyCborObjc is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'TinyCborObjc'
```## Authors
Andrew Podkovyrin, podkovyrin@gmail.com
Hamilton Chapman, hamchapman@gmail.com
Connor Power, connor@connorpower.com
## License
TinyCborObjc is available under the MIT license. See the LICENSE file for more info.