An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# TinyCborObjc

![CI](https://github.com/dashevo/TinyCborObjc/workflows/CI/badge.svg)
[![Version](https://img.shields.io/cocoapods/v/TinyCborObjc.svg?style=flat)](https://cocoapods.org/pods/TinyCborObjc)
[![License](https://img.shields.io/cocoapods/l/TinyCborObjc.svg?style=flat)](https://cocoapods.org/pods/TinyCborObjc)
[![Platform](https://img.shields.io/cocoapods/p/TinyCborObjc.svg?style=flat)](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
#import

NSDictionary *dictionary = ...;
NSData *cborData = [dictionary ds_cborEncodedObject];
```

Decoding
``` objective-c
#import

NSData *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.