File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -600,7 +600,7 @@ public extension Lookup {
600600 /// Available when rawType is in `[.dict, .string]` (if use string, it **MUST** be jsonString)
601601 var dict : [ String : Any ] ? {
602602 switch rawType {
603- case . dict:
603+ case . dict, . object :
604604 return rawDict
605605 case . string:
606606 if let originString = rawValue as? String ,
@@ -620,7 +620,7 @@ public extension Lookup {
620620 /// Available when rawType is in `[.dict, .string]` (if use string, it **MUST** be jsonString)
621621 var dictLookup : Lookup {
622622 switch rawType {
623- case . dict:
623+ case . dict, . object :
624624 return Lookup ( rawDict)
625625 case . string:
626626 if let originString = rawValue as? String ,
@@ -761,14 +761,16 @@ public func += (lhs: inout Lookup, rhs: Lookup) {
761761extension Lookup : Codable {
762762
763763 private var codableDictionary : [ String : Lookup ] ? {
764- if rawType == . dict {
764+ switch rawType {
765+ case . dict, . object:
765766 var d = [ String: Lookup] ( minimumCapacity: rawDict. count)
766767 rawDict. forEach { pair in
767768 d [ pair. key] = Lookup ( pair. value)
768769 }
769770 return d
771+ default :
772+ return nil
770773 }
771- return nil
772774 }
773775
774776 private var codableArray : [ Lookup ] ? {
You can’t perform that action at this time.
0 commit comments