Latest 0.2.1
Homepage https://github.com/paulmelnikow/ObjCBSON
License Apache License, Version 2.0
Platforms osx 10.7, ios 6.0, requires ARC
Dependencies libbson, OrderedDictionary

High-performance BSON serialization and deserialization in Objective-C.

CI Status
Version
License
Platform

Installation

ObjCBSON is available through CocoaPods. It depends on libbson, which
is installed automatically, however two of its build dependences are not.

First, install those:

brew install automake libtool

Then, add the following line to your Podfile:

pod 'ObjCBSON'

Example

#import "BSONSerialization.h"

- (void) bsonExample {
    NSError *error = nil;

    // BSON encode dictionary `sampleDict` to `NSData *` instance `bsonEncodedData`
    NSDictionary *sampleDict = @{ @"sampleKey" : @"sampleValue" };
    NSData *bsonEncodedData = [BSONSerialization BSONDataWithDictionary:sampleDict error:&error];
    NSLog(@"bsonEncodedData=%@ error=%@", bsonEncodedData, [error localizedDescription]);

    // ...end perform decording from BSON back to `NSDictionary *`
    NSDictionary *bsonDict = [BSONSerialization dictionaryWithBSONData:bsonEncodedData error:&error];
    NSLog(@"bsonDict=%@, error=%@", bsonDict, [error localizedDescription]);
}

Development

To develop on the library and run the unit tests, clone the repo, run pod install
from the Example directory, and open the xcworkspace.

Contribute

License

The project is licensed under the Apache 2.0 license.

Latest podspec

{
    "name": "ObjCBSON",
    "version": "0.2.1",
    "summary": "High-performance BSON serialization and deserialization in Objective-C",
    "description": "High-performance BSON serialization and deserialization in Objective-C",
    "homepage": "https://github.com/paulmelnikow/ObjCBSON",
    "license": "Apache License, Version 2.0",
    "authors": "Paul Melnikow",
    "source": {
        "git": "https://github.com/paulmelnikow/ObjCBSON.git",
        "tag": "0.2.1"
    },
    "social_media_url": "https://twitter.com/paulmelnikow",
    "requires_arc": true,
    "source_files": "Pod",
    "private_header_files": "Pod/*-private.h",
    "user_target_xcconfig": {
        "USER_HEADER_SEARCH_PATHS": "$(PODS_ROOT)/libbson/src/bson"
    },
    "dependencies": {
        "libbson": [
            "1.6.1-cocoapods-rc1"
        ],
        "OrderedDictionary": [
            "~> 1.2"
        ]
    },
    "platforms": {
        "osx": "10.7",
        "ios": "6.0"
    }
}

Pin It on Pinterest

Share This