MsgPackSerialization 0.0.1

MsgPackSerialization 0.0.1

TestsTested
LangLanguage CC
License MIT
ReleasedLast Release Dec 2014

Maintained by Mattt Thompson.


Downloads

Total13,041
Week0
Month65

Installs

Apps70
Test Targets9
powered by Segment

GitHub

Stars98
Watchers1
Forks9
Issues0
Contributors2
Pull Requests1

Code

Files21
LOCLines of Code 2,752


MsgPackSerialization encodes and decodes between Objective-C objects and MsgPack data, following the API conventions of Foundation's NSJSONSerialization class.

Usage

id obj = @{
           @"foo": @(42.0),
           @"bar": @"lorem ipsum",
           @"baz": @[@1, @2, @3, @4]
           };

NSError *error = nil;

CFAbsoluteTime t_0 = CFAbsoluteTimeGetCurrent();
NSData *data = [MsgPackSerialization dataWithMsgPackObject:obj options:0 error:&error];
NSLog(@"Packed: %@ (Elapsed: %g)", data, CFAbsoluteTimeGetCurrent() - t_0);

CFAbsoluteTime t_1 = CFAbsoluteTimeGetCurrent();
NSLog(@"Unpacked: %@ (Elapsed: %g)", [MsgPackSerialization MsgPackObjectWithData:data options:0 error:&error], CFAbsoluteTimeGetCurrent() - t_1);

Contact

Mattt Thompson

License

MsgPackSerialization is available under the MIT license. See the LICENSE file for more info.