This repository was archived by the owner on Mar 26, 2020. It is now read-only.
This repository was archived by the owner on Mar 26, 2020. It is now read-only.
Json11 Benchmarks #41
Open
Description
First I want to thank you @dropbox to share this project.
I'm handling this simple json benchmark project https://github.com/loretoparisi/ios-json-benchmark
Here some results compared to well known parsers (C++, Objective-C so far only) for mobile devices and not like JSONKit
, Gason
, RapidJSON
, Apple's NSJSONSerialization
(more to come). I have integrated Json11
The integration is as simple as
#import "json11.hpp"
@implementation Json11
- (NSString*)parse:(NSString*)json {
const char* data = [json UTF8String];
json11::Json parser;
parser = json11::Json(data);
std::string jsonString;
parser.dump(jsonString);
return [NSString stringWithstring:jsonString];
}
@end
where [NSString stringWithstring:jsonString]
converts a std:string
to a iOS Foundation NSString
5 times parsing of a 322 Bytes JSON file