NSScreencast Episode #131 Swift JSON Redux Part 2
Swift JSON Redux Part 2 - NSScreencast
JSONをparseするライブラリの続き
- class JSArray<A, B : JSONDecode where B.J == A> : JSONDecode {
- class func fromJSON(j: JSValue) -> [A]? {
- let mapped = array.map { B.fromJSON($0) }
- let results = compact(mapped)
- class func fromJSON(j: JSValue) -> [A]? {
- generic type parameters
けっこうよく分からない