CocoaPods trunk is moving to be read-only. Read more on the blog, there are 14 months to go.
| TestsTested | ✓ |
| LangLanguage | SwiftSwift |
| License | Apache 2 |
| ReleasedLast Release | Jan 2016 |
| SPMSupports SPM | ✗ |
Maintained by Logan Wright.
A pure-Swift JSON serializer and deserializer.
import PureJsonSerializer
// parse a JSON data
let data: NSData = ...
do {
let json = try Json.deserialize(jsonSource)
let value = json["Foo"]?["bar"]?.stringValue ?? ""
print(value)
} catch {
print("Json serialization failed with error: \(error)")
}// build a JSON structure
let profile: Json = [
"name": "Swift",
"started": 2014,
"keywords": ["OOP", "functional programming", "static types", "iOS"],
]
println(profile.description) // packed JSON string
println(profile.debugDescription) // pretty JSON stringlet serializedJson = json.serialize(.PrettyPrint)Swift-JsonSerializer is a JSON serializer and deserializer which are implemented in Pure Swift and adds nothing to built-in / standard classes in Swift.
This library is featured in a complete Json mapping library you can find here.
swiftc -O) as of Xcode 6.1.1 / Swift version 1.1 (swift-600.0.56.1).Fuji, Goro (gfx) [email protected]
The Apache 2.0 License