Skip to content

dlleng/SwiftJSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftJSON

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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)

Author

dlleng, [email protected]

License

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

About

An easy way to read json

Resources

License

Stars

Watchers

Forks

Packages

No packages published