SkygearIO / skygear-SDK-iOS

Skygear SDK for iOS
https://skygear.io
Other
10 stars 28 forks source link

Record deserialization when encountering un-deserializables #71

Closed cheungpat closed 7 years ago

cheungpat commented 7 years ago

follows #64

The iOS SDK expects the server to send valid response. In case the server sends a response that the iOS SDK does not expect, SKYDataSerialization returns nil (which IMHO is the expected behavior). This caused nil being added to NSDictionary, which is illegal.

The SKYRecordDeserializer should, on encountering a nil value, do one of the following (your pick):

and also emits a log stating that the value of the key failed to deserialize.

cheungpat commented 7 years ago

i wonder if you have time to do this, should be a simple fix @ben181231