OfficeDev / Office-365-SDK-for-Android

Microsoft Services SDKs for Android produced by MS Open Tech.
https://dev.office.com/android
Other
224 stars 75 forks source link

Handling OData properties #19

Open joshgav opened 9 years ago

joshgav commented 9 years ago

We should consider how to make the libraries resilient to

  1. unexpected additional properties or
  2. missing metadata-specified properties.

The OData spec calls for clients to never fail when they find additional properties, as 1) minor version updates and 2) open types are allowed to add properties even without clients being aware of them. So for unexpected additional properties we should log that additional properties were received but not throw any error.

For missing metadata-specified properties:

PabloZaiden commented 9 years ago

For (1) the library just ignores the extra properties, and the missing properties are deserialized with the default java value for each entity

joshgav commented 9 years ago

So we're good on (1).

For (2), as I understand the spec the value should be set to null. Search for the word "null" in OData-Protocol.