mattt / Msgpackserialization
Licence: mit
MsgPack Serialization for Objective-C
Stars: ✭ 102
Programming Languages
c
50402 projects - #5 most used programming language
MsgPackSerialization
This project is no longer maintained. See @Flight-School/MessagePack for a Swift Codable implementation of the MessagePack format.
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
License
MsgPackSerialization is available under the MIT license. See the LICENSE file for more info.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].