Latest 0.0.1
Homepage https://github.com/ShengHuaWu/JSONParser
License MIT
Platforms ios 9.0, requires ARC
Authors

JSON Parser Carthage compatible

This is a JSON parser in Swift.
There have been many JSON parser projects in GitHub, such as SwiftyJSON and JASON.

Usage

First thing is to import the JSONParser framework.
Once imported, you’re able to create a JSON with NSData, and get the value via subscript.

let data: NSData = ...
let json = try! JSON(data: data)
let email = json["email"].string // Return an optional string.
let name = json["name"].stringValue // Return a name string or an empty string. 

Carthage Install

Add the following line into your Cartfile,

  github "ShengHuaWu/JSONParser"

, and then run carthage update --platform ios in your terminal.

CocoaPods Install

Create a Podfile as following,

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'JSONParser'

, and then run pod install in your terminal.

Latest podspec

{
    "name": "JSONParser",
    "version": "0.0.1",
    "summary": "JSON parser",
    "description": "This project is a JSON parser.",
    "homepage": "https://github.com/ShengHuaWu/JSONParser",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ShengHua Wu": "[email protected]"
    },
    "social_media_url": "https://twitter.com/ShengHuaWu",
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/ShengHuaWu/JSONParser.git",
        "tag": "0.0.1"
    },
    "source_files": "JSONParser/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This