Affects Version/s: V4.0_CS01
Fix Version/s: V4.0_CSD03
Component/s: JSON Format
[Proposed][Applied for Review]
Change the description of JSON format section 3.1.3 "odata.metadata=none" to state explicitly:
odata.metadata=none cannot be used in delta requests.
Change section on odata.type to clarify that type MUST be included in minimal or full metadata for the listed conditions.Change the description of JSON format section 3.1.3 "odata.metadata=none" to state explicitly: odata.metadata=none cannot be used in delta requests. Change section on odata.type to clarify that type MUST be included in minimal or full metadata for the listed conditions. Accepted: https://www.oasis-open.org/committees/download.php/50924/odata-meeting-55_on-20131003-minutes.html#odata-538
Suppose a service supports the addressing conventions (so a client would be able to formulate read/edit links from entity set names and key properties), and the client, being meta-data aware, wants to receive a large set of results (of declared type A, with possible subtype B) that is fairly compactly encoded. By metadata-aware, that means the client has already fetched the meta-data document.
Now the client will still need to receive odata.type for any entities of subtype B, as in the general case this cannot be determined from the returned properties (unless or more of the returned properties can be used as proxy type marker).
The difficulty here is that such a client does not generally need to receive the context URL. And in the general case, odata.context URLs are going to be quite a bit larger than the odata.type, similar to the metadata uri in pre-V4 OData. For example, with this service:
the metadata uri can chew up nearly one third of the total JSON encoding. The client then must receive and parse a lot of information it does not need (GZIP can help with the network size of bloated context URLs, but they still need to be parsed which can chew up valuable CPU, especially on mobile devices).
There may be cases where a V4 context URI are somewhat more concise than a pre-V4 metadata uri, but odata.context is still generally "bloated" in comparison to odata.type.
And none of the odata.metadata options are suitable to express the client requirements.
(a) odata.metadata=minimal: the odata.type is not required to be present, and the odata.context URLmust be included in the response, even though the client does not need it
(b) odata.metadata=full: the odata.type is present (when needed, e.g. for entities of subtype B) but odata.context URL must be included in the response, along with various links which the client does not need.
(c) odata.metadata=none: the odata.type is not present