File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ protocol JSONDictionary {
1515
1616extension Dictionary : JSONDictionary {
1717 func dictionaryIsJSONEncodable( ) -> Bool {
18- return Key . self is String . Type && Value . self is JSONEncodable . Type
18+ return Key . self is String . Type && ( Value . self is JSONEncodable . Type || Value . self is JSONEncodable . Protocol )
1919 }
2020
2121 func dictionaryMadeJSONEncodable( ) -> [ String : JSONEncodable ] {
@@ -37,7 +37,7 @@ protocol JSONArray {
3737
3838extension Array : JSONArray {
3939 func elementsAreJSONEncodable( ) -> Bool {
40- return Element . self is JSONEncodable . Type
40+ return Element . self is JSONEncodable . Type || Element . self is JSONEncodable . Protocol
4141 }
4242
4343 func elementsMadeJSONEncodable( ) -> [ JSONEncodable ] {
You can’t perform that action at this time.
0 commit comments