Skip to content
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

Description

@loretoparisi

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
schermata 2015-10-13 alle 22 05 02

1 times parsing of a 55435 Bytes JSON file
schermata 2015-10-13 alle 22 01 01

100 times parsing of a 55435 Bytes JSON file
schermata 2015-10-13 alle 22 01 40

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions