From 1ec7e5b06c7d4ea6dc5fad0c551170d5a2c7bb47 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Sep 2015 16:28:04 -0400 Subject: [PATCH] Extension methods use the converter and wrap the static prisms. --- prototype/Doubt/JSON.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prototype/Doubt/JSON.swift b/prototype/Doubt/JSON.swift index 06ff192fb..6ebcd9922 100644 --- a/prototype/Doubt/JSON.swift +++ b/prototype/Doubt/JSON.swift @@ -72,23 +72,23 @@ extension JSONConvertible { extension Prism where To : JSONConvertible { public var number: Prism { - return self >>> Prism(forward: { $0.JSON.number }, backward: { To(JSON: .Number($0)) }) + return self >>> To.JSONConverter >>> Doubt.JSON.number } public var boolean: Prism { - return self >>> Prism(forward: { $0.JSON.boolean }, backward: { To(JSON: .Boolean($0)) }) + return self >>> To.JSONConverter >>> Doubt.JSON.boolean } public var string: Prism { - return self >>> Prism(forward: { $0.JSON.string }, backward: { To(JSON: .String($0)) }) + return self >>> To.JSONConverter >>> Doubt.JSON.string } public var array: Prism { - return self >>> Prism(forward: { $0.JSON.array }, backward: { To(JSON: .Array($0)) }) + return self >>> To.JSONConverter >>> Doubt.JSON.array } public var dictionary: Prism { - return self >>> Prism(forward: { $0.JSON.dictionary }, backward: { To(JSON: .Dictionary($0)) }) + return self >>> To.JSONConverter >>> Doubt.JSON.dictionary } }