AnyCodable
AnyCodable copied to clipboard
NSNUmber is converting to Bool
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.
I'm running into the same issue