1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 08:25:19 +03:00

Restore the static prisms.

This commit is contained in:
Rob Rix 2015-09-21 16:25:34 -04:00
parent 0ca911e603
commit b5efc49129

View File

@ -41,6 +41,12 @@ public enum JSON {
} }
public static let JSON: Prism<AnyObject, Doubt.JSON> = Prism(forward: toJSON, backward: toAnyObject) public static let JSON: Prism<AnyObject, Doubt.JSON> = Prism(forward: toJSON, backward: toAnyObject)
public static let number: Prism<Doubt.JSON, Double> = Prism(forward: { $0.number }, backward: { .Number($0) })
public static let boolean: Prism<Doubt.JSON, Bool> = Prism(forward: { $0.boolean }, backward: { .Boolean($0) })
public static let string: Prism<Doubt.JSON, Swift.String> = Prism(forward: { $0.string }, backward: { .String($0) })
public static let array: Prism<Doubt.JSON, ArrayType> = Prism(forward: { $0.array }, backward: { .Array($0) })
public static let dictionary: Prism<Doubt.JSON, DictionaryType> = Prism(forward: { $0.dictionary }, backward: { .Dictionary($0) })
} }
public protocol JSONConvertible { public protocol JSONConvertible {