We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cfad53 commit 18003b0Copy full SHA for 18003b0
ParseLiveQuery/ParseLiveQuery/Internal/ClientPrivate.swift
@@ -19,7 +19,10 @@ private func parseObject<T: PFObject>(_ objectDictionary: [String:AnyObject]) th
19
throw LiveQueryErrors.InvalidJSONError(json: objectDictionary, expectedKey: "objectId")
20
}
21
22
- guard let object = PFDecoder.object().decode(objectDictionary) as? T else {
+ //workaround to fix missing __type key Decoder expects with value "Object"
23
+ var dict = objectDictionary
24
+ dict["__type"] = String("Object") as AnyObject
25
+ guard let object = PFDecoder.object().decode(dict) as? T else {
26
throw LiveQueryErrors.InvalidJSONObject(json: objectDictionary, details: "cannot decode json into \(T.self)")
27
28
0 commit comments