Latest 0.1
Homepage https://github.com/CaptainTeemo/TMJSON
License MIT
Platforms ios 7.0, requires ARC
Authors

[![CI Status](http://img.shields.io/travis/Captain Teemo/TMJSON.svg?style=flat)](https://travis-ci.org/Captain Teemo/TMJSON)
Version
License
Platform

TMJSON provides a safe and easy way to play with JSON, totally inspired by SwiftyJSON.

Requirements

  • iOS 7.0+
  • Xcode 7

Adding to your project

Using CocoaPods

Just add pod ‘TMJSON’ to your Podfile.

Example

Usage is quite similar to SwiftyJSON.

TMJSON *json = [[TMJSON alloc] initWithObject:responseObject];

NSArray *rootArray = json.arrayValue;
NSLog(@"array: %@", rootArray);

TMJSON *firstObject = rootArray[0];
NSString *wrongKey = firstObject[@"Teemo"].stringValue;
NSLog(@"wrongKey: %@", wrongKey);

NSString *name = firstObject[@"name"].stringValue;
NSLog(@"name: %@", name);

NSDictionary *address = firstObject[@"address"].dictionaryValue;
NSLog(@"address: %@", address);

double latitude = firstObject[@"address"][@"geo"][@"lat"].doubleValue;
NSLog(@"lat: %f", latitude);

License

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

Latest podspec

{
    "name": "TMJSON",
    "version": "0.1",
    "summary": "TMJSON is a SwiftyJSON style tool to deal with JSON.",
    "description": "An awesome way to deal with JSON in Objective-C. The implementation is totally inspired by SwiftyJSON.",
    "homepage": "https://github.com/CaptainTeemo/TMJSON",
    "license": "MIT",
    "authors": {
        "Captain Teemo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/CaptainTeemo/TMJSON.git",
        "tag": "0.1"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "TMJSON": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This