Open filipepereira-ag opened 1 year ago
When dictionary contains an NSNumber as 0 or 1, encodable method is mapping to true or false because 0 or 1 is also a boolean for swift.
I think this bug was introduced in #69 because NSNumber condition was removed from the first switch statement.
Example:
var dictionary = [ "int": NSNumber(0) ]
AnyEncodable is returning ["int": false]. This problem only happens from version 0.6.5.
When dictionary contains an NSNumber as 0 or 1, encodable method is mapping to true or false because 0 or 1 is also a boolean for swift.
I think this bug was introduced in #69 because NSNumber condition was removed from the first switch statement.
Example:
AnyEncodable is returning ["int": false]. This problem only happens from version 0.6.5.