To run the example project, clone the repo, and run pod install
from the Example directory first.
SwiftJSON is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SwiftJSON'
and you can easily use it as:
let jsonstr = """
{
"result": 1.23,
"dog": {
"name": "dog dog",
"aa": {
"a": 123,
"b": "ccc",
"arr": [11,22,33]
}
}
}
"""
let json = JSONObject.make(jsonstr)
print(json)
print(json["dog"]["aa"]["arr"][1].stringValue)
print(json["result"].stringValue)
dlleng, [email protected]
SwiftJSON is available under the MIT license. See the LICENSE file for more info.