@@ -26,7 +26,11 @@ protocol JSONEquatable {
2626
2727extension NSNumber : JSONEquatable {
2828 var isBoolean : Bool {
29+ #if os(Linux)
30+ return objCType. pointee == 0x63 // character code for 'c'
31+ #else
2932 return CFNumberGetType ( self ) == . charType
33+ #endif
3034 }
3135
3236 func isJSONEquals( to element: JSONElement ) -> Bool {
@@ -55,6 +59,12 @@ extension NSString: JSONEquatable {
5559 }
5660}
5761
62+ extension String : JSONEquatable {
63+ func isJSONEquals( to element: JSONElement ) -> Bool {
64+ return ( self as NSString ) . isJSONEquals ( to: element)
65+ }
66+ }
67+
5868extension NSNull : JSONEquatable {
5969 func isJSONEquals( to element: JSONElement ) -> Bool {
6070 guard case . null = element else {
@@ -85,6 +95,12 @@ extension NSArray: JSONEquatable {
8595 }
8696}
8797
98+ extension Array : JSONEquatable {
99+ func isJSONEquals( to element: JSONElement ) -> Bool {
100+ return ( self as NSArray ) . isJSONEquals ( to: element)
101+ }
102+ }
103+
88104extension NSDictionary : JSONEquatable {
89105 func isJSONEquals( to element: JSONElement ) -> Bool {
90106 switch element {
@@ -108,3 +124,9 @@ extension NSDictionary: JSONEquatable {
108124 }
109125 }
110126}
127+
128+ extension Dictionary : JSONEquatable {
129+ func isJSONEquals( to element: JSONElement ) -> Bool {
130+ return ( self as NSDictionary ) . isJSONEquals ( to: element)
131+ }
132+ }
0 commit comments