I am trying to use Parse-Swift
SDK, and specifically in the app database I have some properties which are dictionaries, like this one:
elements: Dictionary<String, Any>
["test_string": "hello", "test_number": 22.2] // an example of a value for this property
Now I tried to write this ParseObject
in Swift:
import Foundation; import ParseSwift
struct TestObject: ParseObject {
var objectId: String?
var createdAt: Date?
var updatedAt: Date?
var ACL: ParseACL?
var originalData: Data?
var elements: [String: Any]?
}
But doing this, I get these errors:
Type 'TestObject' does not conform to protocol 'Decodable'
Type 'TestObject' does not conform to protocol 'Hashable'
Type 'TestObject' does not conform to protocol 'Encodable'
Type 'TestObject' does not conform to protocol 'Equatable'
What should I do? Thank you for your help