Flight-School / AnyCodable

Type-erased wrappers for Encodable, Decodable, and Codable values
https://flight.school/books/codable
MIT License
1.28k stars 132 forks source link

How to convert AnyCodable to Hashable #45

Closed glve1027 closed 3 years ago

glve1027 commented 3 years ago

currently i have some data. This data is [String: AnyCodable], i just want to get this data's hashvalue. Because the value in this data is dynamic. It can be Number/String/Dictionary/Array/Other Object. How should I do??

//???
extension AnyCodable: Hashable {

}
minacle commented 3 years ago

AnyCodable is not conforming Hashable so you can't perform it in current version 0.4.0.