What did you do?
How would you recommend conforming JSON to Hashable?
My use case looks something like this:
struct MyModel: Equatable, Hashable, Codable {
var name: String
var value: Int
var json: JSON // Not Hashable error
}
What did you expect to happen?
If JSON already conformed to Hashable like it does Codable that would be most desirable.
I could extend JSON to conform to Hashable in my project, but am interested to hear what you recommend.
I understand this is a feature request rather than a bug.
Environment
- SwiftyJSON: 5.0.1
- Xcode Version: 14.3.1
- Swift Version: 5.8.1
- Swift Package Manager - Swift 5.8.1
What did you do?
How would you recommend conforming
JSONtoHashable?My use case looks something like this:
What did you expect to happen?
If
JSONalready conformed toHashablelike it doesCodablethat would be most desirable.I could extend
JSONto conform toHashablein my project, but am interested to hear what you recommend.I understand this is a feature request rather than a bug.
Environment